If you're using ajax, try the dataType option to be setted as json, and so, the message from the server formatted as json, will be automatically transformed into an array. Check, if you're using a php version that supports json convert function, so, you can use json_encode(). if not, check examples on the net that allows you to create a safe json string. Sometimes, that's the problem.
- [jQuery] Display JSon String shapper
- [jQuery] Re: Display JSon String MorningZ
- [jQuery] Re: Display JSon String Mario Soto