i have a set of three evaluations to make.
if the first one is true the second and third should no longer be evaluated
if the first is false, the second is true the third should not be evaluated
Don't know how you would call this, anyhow i didn't really like the idea of having many if, else statements stuck together. I decided to use a function as such:
function levelchild($theorder) {
if(!isset($theorder)) return 1;
if(!strstr($theorder,'.')) return 2;
$digits = strstr($theorder,'.');
return (strlen($digits)-1)/2+1+1;
}
Is this a good solution, should i have chose something else?