PHP Notes and Examples
Jump to navigation
Jump to search
PHP Notes and Examples
change Array to JSON
$foo=json_encode($array,1); echo $foo . "\n";
Convert a VALID JSON string to array
$foo=json_decode($json, True); print_r($foo);
Example foreach loop (simple)
foreach ($nestedArray1 as $Array1) { do something with new array $array1[??}; }