darylchicken
New Member
I have data like this:\[code\]Array( [data] => Array ( [0] => Array ( [name] => xxxxxxxxxxxx [category] => yyyyyyyy [id] => 12345666666 [data] => ABCDE ) [1] => Array ( [name] => ZZZZZZZZZZZ [category] => JJJJJJ [id] => 88888888888888 [data] => ABCDEHIJK ) ))\[/code\]I need to get the data from the first array only. I don't want to use a loop. I have tried this:\[code\]$name = $data['data'][0]['name'];\[/code\]but that doesn't get the name. Does anyone know how I can get the specific name only from the first array?EDIT** my code:\[code\]$movie_details_tmdb = $tmdb->searchMovie($search);$movie_details_tmdb_results = json_decode(json_encode($movie_details_tmdb), true);$id = $movie_details_tmdb_results['results'][0]['id'];\[/code\]it's in the same format as the code above.