Answers for "php if empty object"

PHP
1

php check of object is empty

$arr = (array)$obj;
if (!$arr) {
    // do stuff
}
Posted by: Guest on September-23-2021
4

php empty object

$x = new stdClass();
Posted by: Guest on February-19-2020
3

php check for empty string

if (empty($var)) {
    echo '$var is either 0, empty, or not set at all';
}
Posted by: Guest on March-07-2020
0

php check if object is empty

if($users->count()==0){
					$result->errer = "not exist";
				}
Posted by: Guest on August-15-2021

Browse Popular Code Answers by Language