Hi guys,
Is there another way to do the following...
if(isset($varA) || isset($varB)){
include_once('var_file.php'); // only needs to be included if one of the above vars are set.
if(isset($varA)){
$theVar = $varA;
}else{
$theVar = $varB;
}
$endValue = functionInFile($theVar);
}
As the variables are already checked if they exist in the IF statement itself - is there anyway to do away with the inner IF statements to see which one was true?
-- Also, as you can see i have an "include" in my if statement - am i write that this will only be included if the if statement is true? Saving my page having to load external files that are otherwise unneeded?
Thanks again guys!