Depending upon what you want to do, a hash dispatch table might be your BFF in this case (bad pun intended.)
In reply to Re: switch statement by boftx in thread switch statement by virtuemart2