Converts a simple two-dimensional array into a one-dimensional array and a two-dimensional array.
In our work, we often need to convert a two-dimensional array into a one-dimensional array. So we need to take it out cyclically. In fact, sometimes we can use some tips to implement it using php built-in functions, but what I'm talking about is a simple two-dimensional number array $ arr = array ('name' => array ('A' => 'abc', 'B' => 'bcd ', 'c' => 'cde'); if we use array_pop (), we can get the one-dimensional array. array_pop () is the last element to delete and return the array.
So we can change the $ arr of the appeal to array ('A' => 'abc', 'B' => 'bcd', 'c' => 'cde '), in this way, the two-dimensional array is converted into a one-dimensional array, but only one-dimensional array is contained in the two-dimensional array. If multiple one-dimensional arrays exist, the last array is returned.