By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,299 Members | 1,210 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,299 IT Pros & Developers. It's quick & easy.

PHP data into javascript

P: n/a
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.

Oct 17 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

<ja*********@gmail.comwrote in message
news:11*********************@k70g2000cwa.googlegro ups.com...
>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
Oct 18 '06 #2

P: n/a

Tim Williams wrote:
<ja*********@gmail.comwrote in message
news:11*********************@k70g2000cwa.googlegro ups.com...
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
wow i am a dumb ass.. i have done that before.. thanks alot good idea

Oct 18 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.