If I have an array, with a single array inside it. Is there a way push the child array values into the parent without having to run a foreach?
For example, if I have an array like this:
array( [0] => array(
"key1" => "value1",
"key2" => "value2",
"key3" => "value3",
)
);
and I want to reduce it to this:
array(
"key1" => "value1",
"key2" => "value2",
"key3" => "value3",
);
Is there a way of doing this without a foreach?
at the moment I'm doing this:
$singleArr = array();
foreach($multiArr as $subArr) {
$singleArr = $subArr;
}