max() under PHP 4.0 returns an array
| From: | Adham Shaaban | Date: | Thu, 03 Aug 2000 02:29:17 +0000 |
| Subject: | max() under PHP 4.0 returns an array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-9863@lists.php.net to get a copy of this message | ||
Hi everyone,
I have some code that gets a value from the database
and uses max() to compare it with a defualt value and
return the bigger value:
.
.
.
return max($row[Max], $default);
this used to work fine under PHP 3.0.5 but i recently
upgraded to PHP4.0.1pl2 and now the function is
returning an array!! I checked and made sure the
values in both $row[Max] and $default are both
integers. The workaround is trivial using if/else but
i'm just wondering if anyone else came across this
same problem.
Adham
__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/