if(count($arr) == count($arr,1)){ echo '一维数组';}else{ echo '多维数组';} 转载于:https://www.cnblogs.com/two-bees/p/10794529.html