On Friday 01 October 2004 03:10, Daevid Vincent wrote:
> I'm sure I'll be flamed for this, but it seems to me that there should be a
> shortcut way to write:
>
> If ($a == 1 || $a == 4 || $a == 20 || ...) {}
>
> To something more like what SQL has...
>
> If ( $a IN(1,4,20,...) ) {}

in_array() or make your own IN() function.

> And same with the very helpful SQL BETWEEN 'function'.
>
> Instead of
>
> If ($a > 1 && $a < 20) {}
>
> Why not
>
> If ($a BETWEEN (1,20)) {}

Ditto, make your own BETWEEN() function.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Please don't put a strain on our friendship by asking me to do something
for you.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to