Passing Data from PHP to Javascript

Опубликовано: 15 Май 2026
на канале: Michael Breitung
8,786
61

In this video tutorial I show you how you can pass data from PHP to Javascript. This can be helpful if you use PHP to load data from a database or from some XML and you need some of that data in JavaScript code you have on your homepage.

I, for example, do this in my gallery pages where I read image information from an XML file and then when the user clicks through the images I present different information based on the current image.

★☆★ my Github ★☆★

https://github.com/MichaelBreitung/

★☆★ my Landscape Photography Channel ★☆★

   / mibreit  

★☆★ Software I use (Affiliate Links) ★☆★

Surfshark VPN for travelling: https://get.surfshark.net/aff_c?offer... ★☆★ homepage★☆★

★☆★ homepage★☆★

http://www.michael-breitung.com