Answers for "if array is empty in laravel"

PHP
2

laravel check if array is empty

//for get() array methods
if($data_array->isEmpty())
{dd('EMPTY');}
else
{dd('NOT EMPTY');}

//for other array
if (count($data_array) > 0) 
{dd('EMPTY');}
else
{dd('NOT EMPTY');}
Posted by: Guest on October-29-2020
17

array empty check in php

if (empty($array)) {
     // list is empty.
}
Posted by: Guest on April-15-2020

Code answers related to "if array is empty in laravel"

Browse Popular Code Answers by Language