convert multidimensional array to single array php
snippet in php

convert multidimensional array to single array php

user3377

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