if(count($arr) == count($arr, COUNT_RECURSIVE)){echo '一维数组';}else{echo '二维数组';} 转载于:https://www.cnblogs.com/itaotao/archive/2013/05/04/3059519.html