Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to json_encode an array in php unexpected identifier

// Don't wrap the json_encode result in quotes
var data = <?php echo json_encode($serializedData) ?>;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #array #php #unexpected #identifier
ADD COMMENT
Topic
Name
4+9 =