function is_array($array){ $s = 1;默认为1为数组 foreach($array as $value){ 在这里判断value是不是数组,是的话,说明是2维 设置$s=2; }return $s;}