json decode-convert to PHP array

Check for json values present Reading json from a file json stored within json fields When you decode remember that you will need to decode the nested json field as a separate decode operation, you won’t get a single array which automatically nests the sub json.

Read More

Dynamic json file

Use a php file which simply outputs json data.  E.g. <?php //Get some data from a table $my_array = array(); $result1 = @mysql_query("SELECT field1, field2 FROM table1 ORDER BY field1"); while ($row = @mysql_fetch_array($result1)) { $my_array[] = $row; } //Add it and some other data to an array $data = array( "results" => array( "my_field1" […]

Read More