javascript reading php variables (js end problem)?

  • Thread starter Thread starter exxos
  • Start date Start date
E

exxos

Guest
still trying to find a workaround for my problems!

alert ("<?PHP echo $stuff[2]; ?>")

This works fine, java outputs the $stuff data from php code..

but can I change the [2] to be controlled from java such as...

var data = "<?PHP echo $stuff[" + count + "]; ?>"

where the count is a js variable and then can cycle though the php generated variables ? what I have above does not seem to work, even if I force the count with an actual number..

var data = "<?PHP echo $stuff[" + 2 + "]; ?>"

Can this be made to work or have I hit another brick wall again ?
 
Back
Top