In my Android application I make a HTTP POST connection:
serverresponse = CustomHttpClient.executeHttpPost(url, postParameters);
All working fine. The url
is pointing to a php page on my server. It echos an array of image urls in JSON format like this:
[".\/pictures\/q\/thumbnails\/28052011172.jpg",".\/pictures\/q\/thumbnails\/picca1.jpg",".\/pictures\/q\/thumbnails\/lockscreen_006.jpg"]
What I want to do is also echo the size of directory. That works fine too, but that puts it right after the JSON array, like so:
echo (json_encode($files));
echo (filesize_r($path));
[".\/pictures\/q\/thumbnails\/28052011172.jpg",".\/pictures\/q\/thumbnails\/picca1.jpg",".\/pictures\/q\/thumbnails\/lockscreen_006.jpg"]4223566
4223566 is the number of bytes. In my application I want to split these two values into different strings so I can use them.
In short, I want to separate these two php echos. I don't want to make two separate HTTP connections for both of them.
Sorry if my question isn't clear enough, I sometimes have a hard time explaining stuff in English.