So I got this array:
$list = simplexml_load_file('http://feu01.ps4.update.playstation.net/update/ps4/list/eu/ps4-updatelist.xml');
if($list) {
$data = array('firmware' => $list->region->system_pup[0]['label']);
header('Content-Type: application/json');
echo json_encode($data);
}
And it outputs this:
{"firmware":{"0":"5.01"}}
But there's also a zero there. How do I remove it from the array so it's like this:
{"firmware":"5.01"}