This single line would do that:
$array = array_column($array, 'plan');
The first argument is an array | The second argument is an array key.
For details, go to official documentation: https://www.php.net/manual/en/function.array-column.php.
More Related Contents:
- PHP multidimensional array search by value
- How to sum all column values in multi-dimensional array?
- How to search by key=>value in a multidimensional array in PHP
- php $_POST array empty upon form submission
- PHP foreach change original array values [duplicate]
- Passing arrays as url parameter
- Are arrays in PHP copied as value or as reference to new variables, and when passed to functions?
- Turning multidimensional array into one-dimensional array [duplicate]
- glob() – sort array of files by last modified datetime stamp
- PHP – Accessing Multidimensional Array Values
- How to get single value from this multi-dimensional PHP array
- Convert array of single-element arrays to a one-dimensional array
- Convert an associative array to a simple array of its values in php
- Posting array from form
- CSV to Associative Array
- Check if a specific value exists at a specific key in any subarray of a multidimensional array
- How to get common values from two different arrays in PHP [closed]
- Comment associative array in PHP Documentor
- What is the meaning of  [closed]
- Get the maximum value from an element in a multidimensional array? [duplicate]
- Returning first x items from array
- What is the difference between array_udiff_assoc() and array_diff_uassoc()?
- Move an array element to a new index in PHP
- How do I declare a two dimensional array?
- PHP get all arguments as array?
- Convert PHP array string into an array
- Combine two 2d arrays and have duplicate rows removed
- How to create multi-dimensional array from a list?
- Save array in mysql database
- How to count the consecutive duplicate values in an array?