Thank you Ruan!
This is just what I was looking for!


"Ryan Sun" <> wrote in message

you put result in an array
$result = array('status' => 'good');
and return encoded string
return Json_Encode($result);

your client will get a string
'{"status": "good"}'
and you use your client tech(eg. javascrpt) to decode this string and finall
get an object

On Fri, Jan 8, 2010 at 3:43 PM, Anthony Papillion <>wrote:

I'm developing a basic webservice to compliment a mobile application I'm
developing or iPhone. While I know how to encode simple variables and
arrays, I'm not sure how to do what I'm needing to do. Basically, I want to
encode a status message to return to the mobile client. Something like

"status" "good_request"

Right now, I'm thinking I should put this in an array and encode/return
that. But is that the right way of thinking? Is there a more correct or
better way to do this?


PHP General Mailing List (
To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to