tet3828 Posted November 5, 2006 Share Posted November 5, 2006 In my script I have a "Switch"switch ($fieldLength) { case "1": <blah,blah,blah>it carries out just fine.how ever one of my cases is "if the number is equal to or greater than 8"this doesn't seem to work:switch ($fieldLength) { case ">=8": <yak,yak,yak>what do I need to type in the case to get the results I need?also how do I paste my script in this window with the proper colors?Im using dreamweaver. all black is driving me nuts Quote Link to comment https://forums.phpfreaks.com/topic/26188-switch-case-values-solved/ Share on other sites More sharing options...
Zane Posted November 5, 2006 Share Posted November 5, 2006 case >= 8don't need quotes Quote Link to comment https://forums.phpfreaks.com/topic/26188-switch-case-values-solved/#findComment-119770 Share on other sites More sharing options...
tet3828 Posted November 5, 2006 Author Share Posted November 5, 2006 when I do that I get the following error:Parse error: parse error, unexpected T_IS_GREATER_OR_EQUAL in /home/content/t/e/t/tetunity/html/shell/data/edit.php on line 166 Quote Link to comment https://forums.phpfreaks.com/topic/26188-switch-case-values-solved/#findComment-119773 Share on other sites More sharing options...
tet3828 Posted November 5, 2006 Author Share Posted November 5, 2006 Incase anyone cares.... this worked:case ($fieldLength >= 8): <blah,blah,blah>} Quote Link to comment https://forums.phpfreaks.com/topic/26188-switch-case-values-solved/#findComment-119781 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.