Sometime it becomes very necessery to display the intermediate values of php variables while the script is running. This is an extremely useful php debugging technique .
Here is a very short code to acheive this
When u run the page you will see an alert box popping up displaying 10 which is the value of the php variable $s.
In the line
alert('<?= $s ?>')
Next I show more complex example of this
This method is an extremely useful debugging technique as you can see the intermediate values of php variables while running a long script.
Back to Tutorial Index page
Your comments are most welcome admin[AT]koderguru.com