Is this correct syntax? PLEASE help:
<?php
if(is_home()){ echo '';}
else if(is_category(4)){ echo '';}
else { echo '';}
?>
It doesn't seem to work the first time. If I refresh it works fine.
Is this correct syntax? PLEASE help:
<?php
if(is_home()){ echo '';}
else if(is_category(4)){ echo '';}
else { echo '';}
?>
It doesn't seem to work the first time. If I refresh it works fine.
Yes, the syntax is correct, as shown here:
http://www.php.net/manual/en/control-structures.elseif.php
But, I assume you actually have something different in each of those empty quoted strings for each echo, as that statement as it stands now could be simplified into just:
echo "";
This topic has been closed to new replies.