Set JavaScript Variable Value

Can you set JavaScript variable value to php variable? Justify your answer?

Questions by pratibhapatel

Showing Answers 1 - 18 of 18 Answers

ionela

  • Jul 29th, 2010
 

php code example:

$i=5;
 echo "<script type="text/javascript">var x=$i; alert(x);</script>";

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions