if string changes then run some code?
Hi guys, I have a string that is echo'd on my PHP page
$output_string
and a piece of javascript updates $output_string with the current song being played on the radio, now is it possible to automatically run a piece of code everytime that $output_string changes?
Regards
Jamie.
Re: if string changes then run some code?
You are mixing the JavaScript with PHP ! Once the page is echoed or displayed on the user's browser, what you get is the output of the PHP code! If you wish to communicate with the PHP page and dynamically change the contents, you could use AJAX. jQuery library has 3 or 4 AJAX extensions. Have a look at it.
:wave: