PHP If Else Statement Structure.
-
Hey, I wasn’t really sure where to post this. I’m a bit embarrassed asking for help on this as I’m a second year Web Devloper and really should know the answer.
Basically I have a PHP statement that displays my page navigation plugin. It says if the function exists then display it.
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
I’ve been trying to structure it as an If Else so that if the function does not exist then I could display a few text links. I can’t seem to get the structure right. I have used plenty of If Else stetements in the past but I’m unfarmilliar of how to use it when calling on functions such as this. Would anybody be able to help me structure this into an If Else statement?. I know it’s something simple, but it’s still beyond my knowledge.
Any help would be greatly appreciated.
Thanks
- The topic ‘PHP If Else Statement Structure.’ is closed to new replies.