OK, I have: <?php if($dabadee !== '') { echo $dabadee; } else { echo da_badoo(); } ?> This is correct, however i want to change the second part so that if dabadee is not there it will output some string e.g "hello" ? At the moment it will output da_badoo();, but i want to change this to some string but can't get it to work? So instead of da_badoo(); it should output the word "hello"
<?php if($dabadee!='' )//diff { echo $dabadee; } else { echo "Hello";//diff } ?> PHP: '//diff' indiciates the lines that have been changed. If the string you want to output contains a variable that should be parsed, wrap your string in double quotes, else if use single quotes.
Also, use this <?php if(!empty($dabadee))//diff { echo $dabadee; } else { echo "Hello";//diff } ?> PHP: http://php.net/empty will probably be easier for you to use than typing $var != '' or $var == '' etc etc. Save some typing I guess