How to check if a multidimensional array is empty or not?

前端 未结 6 1437
[愿得一人]
[愿得一人] 2021-02-01 05:20

Basically, I have a multidimensional array, and I need to check whether or not it is simply empty, or not.

I currently have an if statement trying to do thi

6条回答
  •  情书的邮戳
    2021-02-01 05:55

    So simply check for if the first key is present in array or not.

    Example

    if(!empty($csv_array[1])) 
    {   
        //My code goes here if the array is not empty
    }
    

提交回复
热议问题