View Full Version : $var

03-10-2007, 06:06 PM
I have a var, lets call it $VAR How can i display content if the var does not have a value?

I.E if $VAR has a value of abcdefg then the text there would be abcdefg
and if there is no value the text that would be there is "Sorry, somthing bad happened."

03-10-2007, 08:05 PM
<?=!empty($VAR) ? $VAR : 'Sorry, something bad happened.';?>