I’m trying to make my javascript menu dynamic by pulling existing pages from my mysql database.
I want to do this:
Apply php/MySql while loop in javascript object –
But in a .js file.
anylinkmenu4.items=[
[" echo looped content here ", "echo looped content here.php"] ]
If the question above answers the question please let me know because I haven’t been able to run php in a .js file.
Serve a .php JavaScript file instead of a .js file, or serve it inline, or use Ajax.
Thanks to minitech for the answer