Simple conditional output
-
Dear ladies and gents,
beg a pardon for my possible ignorance, but unfortunately I’m stuck with not being able to find a simple straightforward solution.
I am using my own template to display events in a sidebar widget, ie. events.php
Here I’d simply like to display different outputs using different strings likeecho EM_Events::output( $myargs );
based on the condition statement “if the output is empty”, ie. no items with those args are found. So if it matches then good, show, if not – let’s try another string. Sure I can look for the “No events” string but there must be a better way.‘m definitely missing something fundamental here and would like to avoid writing special conditional functions as described in docs as I am not so experienced in PHP yet.
Any help is greatly appreciated and sorry for some bad English!
- The topic ‘Simple conditional output’ is closed to new replies.