Home > AI > Language > PHP >

json_decode

json_decode ( string $json , bool|null $associative = null , int $depth = 512 , int $flags = 0 )

Example:

$json = '{"foo-bar": 12345}';

$obj = json_decode($json);
print $obj->{'foo-bar'}; // 12345

Leave a Reply