0

How to export PHP variable to external Javascript file?

Please provide a working example.. I am tired of finding solution on net.

22nd Nov 2019, 1:52 PM
Skelli Bro
Skelli Bro - avatar
4 Réponses
22nd Nov 2019, 2:15 PM
VOID
VOID - avatar
0
This is not working... I already tried all methods. In Javascript file, the variable is undefined.
22nd Nov 2019, 3:12 PM
Skelli Bro
Skelli Bro - avatar
0
Can you provide some code?
22nd Nov 2019, 7:16 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
0
Take a simple example like... In 001.php file: $id = "1234"; Now wanna get this value into Javascript file...
23rd Nov 2019, 6:59 AM
Skelli Bro
Skelli Bro - avatar