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 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)): 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 Link to comment https://forums.phpfreaks.com/topic/155584-solved-case-logic/#findComment-818817 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.