php convert multidimensional object to array

56

convert multidimensional array to single array php -

$singleArray = []; 
foreach ($parentArray as $childArray) 
{ 
    foreach ($childArray as $value) 
    { 
    $singleArray[] = $value; 
    } 
}

Comments

Submit
0 Comments