Number comparison: Greater than x but less than y... how?
Posted: Mon Jun 26, 2006 9:49 am
Hi guys,
I'm trying to write a simple game and need to create outcomes that depend on the value of $var.
If $var is between 100 & 110, event #1 happens;
If $var is between 111 & 120, event #2 happens;
etc...
Does anyone know a way of doing this with a switch() statement? If not, another simple way?
Thanks in advance!
Matt
I'm trying to write a simple game and need to create outcomes that depend on the value of $var.
If $var is between 100 & 110, event #1 happens;
If $var is between 111 & 120, event #2 happens;
etc...
Does anyone know a way of doing this with a switch() statement? If not, another simple way?
Thanks in advance!
Matt