json_encode Description: Encode une variable php en notation JSON Syntaxe: string json_encode(mixed $m) Exemple: $a = array(1,2,3); echo json_encode($a); // affiche [1,2,3] $o = array('test'=>1, 'foo'=>'bar'); echo json_encode($o); // affiche {"test":1, "foo":"bar"}