glennn.php Posted June 19, 2010 Share Posted June 19, 2010 i don't know if this can be done with a switch() : switch ($val) { case "value1", case "value2", case "value3" : $par = "Value"; break; } but you see my intent. can someone tell me a way to use a switch to this effect? (instead of if (($val1 == '') || ($val2 == '') || ($val3 == '')) { $par = "Value"; } thanks for your help. GN Link to comment https://forums.phpfreaks.com/topic/205277-help-with-a-switch/ Share on other sites More sharing options...
kratsg Posted June 19, 2010 Share Posted June 19, 2010 switch ($val) { case "value1": case "value2": case "value3": $par = "Value"; break; } i don't know if this can be done with a switch() : switch ($val) { case "value1", case "value2", case "value3" : $par = "Value"; break; } but you see my intent. can someone tell me a way to use a switch to this effect? (instead of if (($val1 == '') || ($val2 == '') || ($val3 == '')) { $par = "Value"; } thanks for your help. GN Link to comment https://forums.phpfreaks.com/topic/205277-help-with-a-switch/#findComment-1074451 Share on other sites More sharing options...
glennn.php Posted June 19, 2010 Author Share Posted June 19, 2010 beaut, thanks Link to comment https://forums.phpfreaks.com/topic/205277-help-with-a-switch/#findComment-1074453 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.