firebase-php icon indicating copy to clipboard operation
firebase-php copied to clipboard

How do I know if get () returned any results?

Open ivent opened this issue 8 years ago • 0 comments

Hello, I am getting an error while scanning the field through the foreach when there is no element of the table I wanted to just display there is no element registered, however I can not check the null test on the return of get someone could help me?

$ListFire = new \Firebase\FirebaseLib(DEFAULT_URL, DEFAULT_TOKEN);
$getListFire = $ListFire->get('/users/');
$decodeListFire	= json_decode($getListFire);

if($decodeListFire===null){
// foreach....
}

// Not Work not return true or false in If

ivent avatar Apr 16 '17 20:04 ivent