update page now

Voting

: min(one, four)?
(Example: nine)

The Note You're Voting On

lincoln dot du dot j at gmail dot com
5 years ago
Normal function solution

//1,2,2,3,6,7,3,1,4,2
$arr=[
    [1,2],
    [2,3],
    6,7,[3,1,[4,2]]
];

function a($array){
    static $res=[];
    foreach($array as $val){
        if(is_array($val)){
            a($val);
        }else{
            $res[]=$val;
        }
    }
    return $res;
}

print_r(a($arr));

<< Back to user notes page

To Top