Have been struggling with introducing empty() into my code... so decided to strip it all down to basics and build up my knowledge of how empty() behaves in php.code extract below:
$snmppdVal = "false";
$custSNMP = !empty($snmppdVal);
echo $custSNMP;
Output I'm getting is 1
everything online suggests that empty() returns a boolean. So why am I getting '1' ?? php version 5.4
source https://stackoverflow.com/questions/70101606/echo-empty-is-echoing-1-rather-than-expected-boolean
Comments
Post a Comment