Hello,

I'm having a PHP array which I json_encode. This array is used by a .js file.

Here's how I do so far:

Code JavaScript:
var myResult = JSON.parse(arrayJsonEncoded);
 
//outputs: result1,result2,result3								
alert(myResult);
 
myResultArray = myResult.split(",");
 
//would expect result2 but... nothing
alert(myResultArray[1]);

How do you retrieve an array from a json string?

Cheers.