siclines Posted April 25, 2009 Share Posted April 25, 2009 hi everyone when using a switch statement, how do you write the case to see if the value is between x and y, then equal value=m? For example, the direction South, in degrees on a compass is 159 to 203, so how do you write the case to read 176 and determine it's south? case ($row[wdir] >= 159): $row[wdir] = 'South'; break; thanks for your help Quote Link to comment https://forums.phpfreaks.com/topic/155584-solved-case-logic/ Share on other sites More sharing options...
.josh Posted April 25, 2009 Share Posted April 25, 2009 case (($row[wdir] >= 159) && ($row[wdir] <= 203)): Quote Link to comment https://forums.phpfreaks.com/topic/155584-solved-case-logic/#findComment-818815 Share on other sites More sharing options...
siclines Posted April 25, 2009 Author Share Posted April 25, 2009 thanks, i appreciate it Quote Link to comment https://forums.phpfreaks.com/topic/155584-solved-case-logic/#findComment-818817 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.