if else does not work
i have problem with if else statement in zend framework
<?php if(count($this->result) > 0) {
echo "not found";
}
else{
echo "advertise here";
}
?>
i开发者_JAVA技巧 would like to hide ads if there is no result, somehow, it does not work, please help
I'm not sure if I've understood the question correctly. But try
<?php
if(count($this->result) > 0) {
echo "advertise here";
}else{
// do nothing..effectively hiding.
}
?>
You can also get rid of the else part completely.
Your if else statement seems to be correct. Did you try to check the content of your variable with a
var_dump($this->result)
精彩评论