i have an array like that in $_POST var; but need know that in some cases the array is a hugge multilevel from json:
array (
'idprocess' => 'f-gen-dato1',
'idform' => 'f-gen-dato2',
)
OR:
array (
array (
'idprocess1' => 'f-gen-dato1',
'idform1' => 'f-gen-dato2',
),
array (
'idprocess2' => 'f-gen-dato1',
'idform2' => 'f-gen-dato2',
)
)
i try to reduce; any arrays with this:
public function ReduARR($Var) {
$result = $Var;
if (is_array($Var)) {
$result = array_reduce($Var, 'array_merge', array());
}
return $result;
}
but i need avoid the array i show you... frist or single level. and work only in the second or multilevel.
i get this error with one lvl:
array_merge(): Argument #2 is not an array