rakdoll
-
Posts
3 -
Joined
-
Last visited
Never
Posts posted by rakdoll
-
-
That is a JSON formated response. In concept it is an array just formatted differently. Its mostly used through JavaScript (or at least by me it is, but I don't speak for everyone)
I have not yet met a need where I need to handle my JSON queries through php but if I were to start I would start here most likely
http://php.net/manual/en/function.json-decode.php
From what I understand of that php function is that it takes a JSON formated array and converts it to a php based array where if you can work with arrays that are php based then you will be all set to handle it how you want handled.
Thank you Sir! Now I know how to proceed.
-
Hi
I need to know how to arrange this thing looking something like an array to be able to find values from it. The problem is, I don't really even know what I am dealing with here. Wonder if you could help me out.
I have the following mess stored in a $messages variable:
{"messages":[{"message_id":2314446,"from":"441234568790","timestamp":1280703181,"text":"first text"},{"message_id":2315147,"from":"123456789014","timestamp":1280755014,"text":"another text"}],"unread":0}
and I don't know how to do the following:
I need is to get only the message text from any message that matches my wanted phone number. For example: I want to get the text value from message which from is 123456789014.
/Henry
How to get value from array/string/.../something
in PHP Coding Help
Posted
One more issue. I managed to convert this from json to array, but I am unable to echo any values from the array.
Here is the array $messages:
How would I go about getting my page echo both the "text" values?
echo $messages["text"]; wont do the trick..