Should, "exit" go BEFORE the final "}" in an if/then statement, or after???
In other words, which is correct below; example "a" or example "b" ??? thank you!!
EXAMPLE A
<?php
if ($a = true) {
//do something
}
exit;
elseif {$b = true) {
//do something else
}
exit;
else {
//do a different thing
}
exit;
?>
EXAMPLE B
<?php
if ($a = true) {
//do something
exit;
}
elseif {$b = true) {
//do something else
exit;
}
else {
//do a different thing
exit;
}
?>