Jump to content

[SOLVED] case logic


siclines

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.