PDA

View Full Version : PHP - Maths



bozley05
October 29th, 2003, 01:24
Hopefully there is an answer to this... I am in the series of doing some "if" work that involves numbers. I currently have:

if ($value => "100000", =< "300000")

which is totally wrong, but what i really want to do is make it recognise the numbers between 100000 and 300000..

Thanks in advance..

hohoho
October 29th, 2003, 03:20
if( ($value >= 100000) && ($value <= 300000) ) {
you can also use
if( ($value >= 100000) and ($value <= 300000) ) {

bloodyveins
October 29th, 2003, 06:48
it's nice to try :
if( ($value >= 100000) & ($value <= 300000) ) { //single AND

and find something unexpected

kabatak
October 29th, 2003, 06:55
what happend?