mikesta707 Posted October 13, 2009 Share Posted October 13, 2009 I have a page that gets a request sent from AJAX, and I am trying to convert a PHP array to a javascript array. is this possible? I tried with Json_encode but it doesn't seem to work. is there something I have to do on the javascript side to make json_decode work? Link to comment https://forums.phpfreaks.com/topic/177595-convert-php-array-to-javascript-array/ Share on other sites More sharing options...
trq Posted October 13, 2009 Share Posted October 13, 2009 Given an associative array json_encode will return a javascript object, otherwise, you get an array. Mind posting your code? Link to comment https://forums.phpfreaks.com/topic/177595-convert-php-array-to-javascript-array/#findComment-936402 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.