Hello,
I would like to set a variable to a default if 2 other vars are undef.
Obviously there are several ways to do this but I would like to do it as I
would in Perl:
$memberState = $_POST['ms'] || $_GET['ms'] || 'Unapproved';
Is there acorrect way to do this in 1 line in PHP?
TIA,
jg
I would like to set a variable to a default if 2 other vars are undef.
Obviously there are several ways to do this but I would like to do it as I
would in Perl:
$memberState = $_POST['ms'] || $_GET['ms'] || 'Unapproved';
Is there acorrect way to do this in 1 line in PHP?
TIA,
jg
Comment