To convert a simple two-dimensional array into a one-dimensional array, we often need to convert the 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's built-in functions, but what I'm talking about is a simple two-dimensional number array $ arrarray (name & gt; array (a & gt; abc, B & gt; bcd, c & gt; cde); if we use array _ to convert a simple two-dimensional array into a one-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.