I Want to convert the string into an array and return the rating value. I've been able to return it as a string so its nothing wrong with the first line of code.
JSON:
{
"id": "23",
"rating": "31"
}
Code:
$json = file_get_contents('http:*****='.$film->id.'') ;
$array = json_decode($json,TRUE);
echo $array[1] ;