Liquid Fire Posted March 16, 2008 Share Posted March 16, 2008 I have a switch statement with 9 case but 5 of them are the same result, is it valid to do the following? case 'int' || 'float || etc... Quote Link to comment Share on other sites More sharing options...
discomatt Posted March 16, 2008 Share Posted March 16, 2008 You want something like this: switch ($var) { case 'this': case 'that': case 'another': // script here break; } http://php.net/switch Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.