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... Link to comment https://forums.phpfreaks.com/topic/96338-switch-question/ 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 Link to comment https://forums.phpfreaks.com/topic/96338-switch-question/#findComment-493135 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.