nasıl PHP ile bu gibi bir JSON nesnesi veri alabilirim ?:JSON verileri php'de nasıl edinilir?
[
{
"name": "Anders",
},
{
"name": "Chris",
},
{
"name": "Peter",
}
]
Bu aldığım PHP kod şudur: Başka bir PHP yapısı ile olarak
$url = 'http://urltotheapi';
$content = file_get_contents($url);
$json = json_decode($content, true);
Oh unuttum, her ismin gösterilmesini istiyorum. – anderskristo
Ne yani. Foreach() 'ın anlamı budur. –