This may be simple and silly question but first I am learning php so your help would be appreciated.
I am trying to get variable with assigned conditional statement.
$gender = $curauth->gender; // getting from wordpress user profile.
if($gender === 'Male') {
echo 'his';
} else {
echo 'her';
}
So what I want to do is it will check if user is Male than in some description it will use his and if female it will use her. Something like below
echo 'jatin soni doesn't have set this option yet. His option will be deactivated soon.';
So here His will be set with above conditional code.
return.returnmay be called from outside a function to stop the execution of the script. See php.net/manual/en/function.return.php