I want to be able to display a fallback statement if an entry in my database table doesn't exist.
On a user profile page I would like to display a phone number. If a user hasn't entered a phone number I would like to display a message to say 'no number has been provided.'
At present, I have been able to display nothing if the value doesn't exist, but this isn't ideal
How would I amend the current code I am using (below) to achieve this?
<?php if(!empty($profile['profile_phonenumber'])){ ?>
<?php echo $profile['profile_phonenumber'] ?>
<?php } ?>