RE: [PHP] why can't i do this?
opps that should read if $_POST['cost'] is <=4 AND it is >=21 then ... > > ok thanks just would have thought it would have known to compare it > with out it having to be there first ... as in > > if $_POST['cost'] is <=4 AND >=21 > > but i'll live with the fact it doesn't read it like i do :) > > Cheers > > > -Original Message- > > From: Keith Vance [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, 17 October 2002 2:12 PM > > To: Peter Houchin > > Cc: php_gen > > Subject: Re: [PHP] why can't i do this? > > > > > > Because that's not the way PHP works. You aren't comparing > anything on the > > second half of the elseif statement. > > > > Keith Vance > > Vance Consulting LLC > > www.vanceconsulting.net > > (206) 355-2399 > > > > Try U.M.A. at http://uma.sourceforge.net/ > > > > > > On Thu, 17 Oct 2002, Peter Houchin wrote: > > > > > howdy > > > > > > can some one please tell me why i can't do this > > > > > > elseif ($_POST['cost'] <=4 && >=20001){...} > > > > > > but i can do this > > > > > > elseif ($_POST['cost'] <=4 && $_POST['cost'] >=20001){...} > > > > > > > > > > > > Cheers > > > > > > Peter > > > "the only dumb question is the one that wasn't asked" > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why can't i do this?
ok thanks just would have thought it would have known to compare it with out it having to be there first ... as in if $_POST['cost'] is <=4 AND >=21 but i'll live with the fact it doesn't read it like i do :) Cheers > -Original Message- > From: Keith Vance [mailto:[EMAIL PROTECTED]] > Sent: Thursday, 17 October 2002 2:12 PM > To: Peter Houchin > Cc: php_gen > Subject: Re: [PHP] why can't i do this? > > > Because that's not the way PHP works. You aren't comparing anything on the > second half of the elseif statement. > > Keith Vance > Vance Consulting LLC > www.vanceconsulting.net > (206) 355-2399 > > Try U.M.A. at http://uma.sourceforge.net/ > > > On Thu, 17 Oct 2002, Peter Houchin wrote: > > > howdy > > > > can some one please tell me why i can't do this > > > > elseif ($_POST['cost'] <=4 && >=20001){...} > > > > but i can do this > > > > elseif ($_POST['cost'] <=4 && $_POST['cost'] >=20001){...} > > > > > > > > Cheers > > > > Peter > > "the only dumb question is the one that wasn't asked" > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why can't i do this?
Because the first example is not correct syntax? I wasn't aware that the first element in a comparison could ever be left out, is it that way in other languages? -Original Message- From: Peter Houchin [mailto:[EMAIL PROTECTED]] Sent: Thursday, 17 October 2002 2:15 PM To: php_gen Subject: [PHP] why can't i do this? howdy can some one please tell me why i can't do this elseif ($_POST['cost'] <=4 && >=20001){...} but i can do this elseif ($_POST['cost'] <=4 && $_POST['cost'] >=20001){...} Cheers Peter "the only dumb question is the one that wasn't asked" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why can't i do this?
Because that's not the way PHP works. You aren't comparing anything on the second half of the elseif statement. Keith Vance Vance Consulting LLC www.vanceconsulting.net (206) 355-2399 Try U.M.A. at http://uma.sourceforge.net/ On Thu, 17 Oct 2002, Peter Houchin wrote: > howdy > > can some one please tell me why i can't do this > > elseif ($_POST['cost'] <=4 && >=20001){...} > > but i can do this > > elseif ($_POST['cost'] <=4 && $_POST['cost'] >=20001){...} > > > > Cheers > > Peter > "the only dumb question is the one that wasn't asked" > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php