supón que tienes el siguiente json:
Código:
{"isbn": "123-456-222",
"author":
{
"lastname": "Doe",
"firstname": "Jane"
},
"editor":
{
"lastname": "Smith",
"firstname": "Jane"
},
"title": "The Ultimate Database Study Guide",
"category": ["Non-Fiction", "Technology"]
}
en una variable php haz lo siguiente:
Código PHP:
$array=json_decode($html,true);
y si quiero acceder por ejemplo a las dos categorias que hay haces lo siguiente:
Código PHP:
echo $array['category'][0];
echo $array['category'][1];