in reply to Is this an efficient way check for certain conditions?

I think what you are asking about (but not sure) is getting away from the if/else block. You may be looking for ...
$number = 1; $code = "foo_".$number; &{$code}();
But, i usually suggest shying away from that unless absolutly needed, because it can get terribly difficult to maintain. But, when it is needed, it is a good tool
can't sleep clowns will eat me
-- MZSanford