so, i get a set of values from my mysql database. i set the a value to a variable called $chatter. i implode the value with the “|” character.
now, later in the code i try to set a javascript variable to a string of the value of $chatter.
[CODE]
[COLOR=”RoyalBlue”]var comments=”<?=$chatter ?>”;
comments=comments.split(‘|’);[/COLOR]
the value is passed to the comments variable, however for some reason the value is not a string. and all the words like “for” and “in” are being seen as commands. also, the script wont execute completely because it cant split the variable because it thinks its a value rather than a string. :-/
so i dont know what to do… i have two other variables that are set up in the same way, and they split into an array just fine. however, its just this variable that gives me problems…. any suggestions?