get all stored ids from the array

You are looking for array_column function.

   $results = array_column($seasons, 'episodes'); // this will return 2d array of arrays with 'episodes'
   $final_results = call_user_func_array('array_merge', $results); // this will make 1d array of 2d array

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top