Possible Duplicate:
Pass a PHP string to a Javascript variable (including escaping newlines)
I have a PHP array that I want to use in a javascript script. I suppose that I will have to convert it to a string that can be understood by javascript, and embed the string inside the script. What is the best way to accomplish this.
EDIT - This is for initial load of the page, not subsequent AJAX call
$textMessages = array();