PHP data into javascript

J

jason.tadeo

I was wondering if there was away beside ajaxs where when i first load
the page i could access php and get all the data i needed and input
into a varable which would not be a php one but a javascript array
varable. So basicly get data from mysql data base and put it into a
javascript array. I know you can use sajax but i only need to access
teh data right away and once. as long i can load it into a javascript
array.
 
T

Tim Williams

I was wondering if there was away beside ajaxs where when i first load
the page i could access php and get all the data i needed and input
into a varable which would not be a php one but a javascript array
varable. So basicly get data from mysql data base and put it into a
javascript array. I know you can use sajax but i only need to access
teh data right away and once. as long i can load it into a javascript
array.

Why don't you just write the js array from PHP in the same way you would
write the HTML content?

Tim
 
J

jason.tadeo

Tim said:
Why don't you just write the js array from PHP in the same way you would
write the HTML content?

Tim

wow i am a dumb ass.. i have done that before.. thanks alot good idea
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top