I am using the following to convert a php array to javascript.
PHP Code:
var TextsArray = new Array(<?php foreach($TextsArray as $Text) { echo "'$Text',"; } ?>);
The output of this statement is:
Code:
var TextsArray = new Array('Your Text Here',);
This generated line creates a syntax error, is it because of the single quotes???
|