Re: range if/else...broken
| From: | Charles Killian | Date: | Thu, 31 Aug 2000 03:15:33 +0000 |
| Subject: | Re: range if/else...broken | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-14499@lists.php.net to get a copy of this message | ||
Hi John,
range() returns an array.
do something like this:
if(in_array($day, range(105,349) ) )
Charles
----- Original Message -----
Subject: [PHP] range if/else...broken
file://this returns the integer, 242.
$day = (date("z"));
// this *should* return a value for $price that comes from the field
'lo_price'
// but it doesn't...why not?
if ($day == range(105,349)) {
$price = $myrow['lo_price'];
} else {
$price =$myrow['hi_price'];
}
Thank you, I'm having a blast learning this stuff...
John Corry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net