Answers for "print single array value php from multidimensional"

PHP
1

php multidimensional array get all values by key

$ids = array_column($users, 'id');
Posted by: Guest on May-04-2021
2

convert multidimensional array to single array php

$singleArray = []; 
foreach ($parentArray as $childArray) 
{ 
    foreach ($childArray as $value) 
    { 
    $singleArray[] = $value; 
    } 
}
Posted by: Guest on October-13-2020

Code answers related to "print single array value php from multidimensional"

Browse Popular Code Answers by Language