zavin Posted April 4, 2009 Share Posted April 4, 2009 <?php $name = $user_name->formattedname; echo $name; ?> If $name is defined then the user name will be displayed. There will be occasions when $name will not be defined. How do I write this so that if $name is not defined an alternate output will be echoed? Link to comment https://forums.phpfreaks.com/topic/152550-alternate-defined-variable/ Share on other sites More sharing options...
Mchl Posted April 4, 2009 Share Posted April 4, 2009 isset empty if Link to comment https://forums.phpfreaks.com/topic/152550-alternate-defined-variable/#findComment-801229 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.