Suggestion for "IN()"

From: Date: Thu, 30 Sep 2004 19:10:28 +0000
Subject: Suggestion for "IN()"
Groups: php.general 
Request: Send a blank email to php-general+get-198326@lists.php.net to get a copy of this message
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,...) ) {} And same with the very helpful SQL BETWEEN 'function'. Instead of If ($a > 1 && $a < 20) {} Why not If ($a BETWEEN (1,20)) {}

« previous php.general (#198326) next »