json encode data
hi how can i generate the following code example from php/mysql result set?
'title' => "Event1",
'start' => "2013-02-10"
'title' => "Event2",
'start' => "2013-02-20"
Load the result data into a 2-D array (details will depend on what DB extension you are using), then json_encode() that array.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Also remember that json_encode() is fairly new and may not be included in your php install...i've ran into this a few times before, in which case there are some other functions and classes available to handle the task.
We do precision guesswork
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)