Jump to content

simple elseif


wkilc

Recommended Posts

I know this works:

 

if($Authorized == "Declined") {

echo "Didn't work";

} else {

echo "Success";
}
?>

 

What if I wanted it to echo "Didn't work" if $Authorized == "Declined" OR if the string is empty, i.e.  $Authorized == "" 

 

Is this it?

 

if($Authorized == "Declined") {
echo "Didn't work";
}

[elseif ($Authorized == "") {
echo "Still didn't work";
}]

} else {

echo "Success";
}
?>

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/224374-simple-elseif/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.