[Solved] Warning: implode(): Invalid arguments passed


There are two possible solutions according to your question & your posted comments:

When you want to print only the names of the ‘name’ key element, then place this code:

$arr = array();
 foreach ($numbers as $key => $value) {
    if(is_array($value)) {
        foreach($value as $val){
            if($key == 'name') {
                $arr[] = $val;
            }
        }
    }
}  
echo implode(" ", $arr);

OR

If you want to print the whole array along with the numbers, then place this code:

$arr = array();
  foreach ($numbers as $key => $value) {
        if(is_array($value)) {
            foreach($value as $val){
                $arr[] = $val;
            }
        } else {
            $arr[] = $value;
        }
    }
    echo $result = implode(" ", $arr);

Hope, this may be helpful to you.

0

solved Warning: implode(): Invalid arguments passed