Combine php array merge without deleting array key

I have such arrays.

Array ( [title] => Array ( [0] => Value1 ) [description] => Array ( [0] => Value1 ) ) 

but I want the arrays to look like this.

 Array ( [title] => Value1 [description] => Value1 ) 
+5
source share
1 answer

Simply

 $array = array_map(function ($element) { return $element[0]; }, $array); 

Test: http://3v4l.org/qd2eG

+6
source

All Articles