View Full Version : putting asp/php values into javascript array

01-15-2003, 02:09 AM
Hi Everyone,

I was just wondering if there was any way of filling a javascript array with values from php or asp values?

say I have an asp array and I want to place its values into a javascript array, is there anyway to transfer the data to be used within a page?

Many Thanks ! :confused:

01-15-2003, 02:15 AM
Sure, loop through the data, and write it dynamically into the javascript that will be sent to the client. :confused:

01-15-2003, 02:31 AM
is it somthing like this?

<% while (blah blah)
x = x + 1%>

im really spure new to javascript, so im basically guessing.

Thanks v much ! :thumbsup:

01-15-2003, 02:35 AM
I guess the syntax depends on which server-side language you are intending to use... that is correct for neither as far as I know, but you have the right idea.