I want to check if $AD = 1, then if not pass to another function, but if $AD = 1 check if AC = contains some value, if not do some stuff.
if ($AD == '1'){
if ($AC == ''){
echo 'AC is empty';
} else {
///////Function/////
}
}
Thanks.
I want to check if $AD = 1, then if not pass to another function, but if $AD = 1 check if AC = contains some value, if not do some stuff.
if ($AD == '1'){
if ($AC == ''){
echo 'AC is empty';
} else {
///////Function/////
}
}
Thanks.
An
else if
statement must always correspond to a beginningif
statement on the same "nesting level".Your inner
else if
does not have any beginningif
statement and it therefore fails.Since this is basic PHP (actually IFs are mostly not language-dependent) stuff, I recommend you reading a beginner's tutorial.