Transform a simple two-dimensional array into a one-dimensional array, a two-dimensional array of dimensions
In our work, we often need to turn a two-dimensional array into a one-dimensional array. Then we need to loop out, in fact, sometimes we can use a few tips, with the help of PHP built-in functions, but I'm just talking about a simple two-dimensional array $arr= array (' Name ' =>array (' a ' = ' = ' abc ', ' B ' = ' + ') BCD ', ' c ' = ' cde '); If we use Array_pop (), we can get a one-dimensional array, and array_pop () would have deleted and returned the last element of the array.
So we can turn the $arr of the appeal into an array (' a ' = = ' abc ', ' b ' = = ' BCD ', ' c ' = ' CDE '), so that the two-dimensional array becomes a one-dimensional array, but is limited to a one-dimensional array in a two-dimensional array, If you have multiple one-dimensional arrays, the last array is returned.
http://www.bkjia.com/PHPjc/1034504.html www.bkjia.com true http://www.bkjia.com/PHPjc/1034504.html techarticle to transform a simple two-dimensional array into a one-dimensional array, a two-dimensional array of arrays in work we often need to turn a two-dimensional array into a one-dimensional array. Then we need a loop to take out, in fact, sometimes I ...