To pass an array from PHP to javascript via ajax, I am going to use json_encode, and recieve it on the javascript end. However, I will be returning multiple rows from my MySQL database, and need to return multiple JSON-formatted arrays. One way I thought of doing this was to string the JSON arrays together in php with some obscure character, such as a pipe character, and then separate them on the javascript end. But is there a more elegant way to do this?
Edit: this post yapmak ne çalışıyorum açıklıyor.