I have to show the record from database if at least one filed is filled with value out of 50 fields for a row.
I fetched data from database successfully. Stored in array of object like this
$obj[0]->prop1;
$obj[0]->prop2;
$obj[1]->prop1;
$obj[1]->prop2;
There are more than 50 properties for a object.
I have to check each property if one of them is not empty show that record.
I have a long if like this
if ($obj[$counter]->prop1 !='' || $obj[0]->prop2 !='' ...
echo "show record"
wanted to know if there is shorten way. let me know if anything is not clear
Declare a function
isEmpty()in the class. For each instance, you will have to only call