ID: 27225 User updated by: chris dot walsh at pni dot com Reported By: chris dot walsh at pni dot com Status: Wont fix Bug Type: Feature/Change Request Operating System: Linux PHP Version: 4.3.5RC2 New Comment:
That works... as does an ereg() call, but it seems kind of clunky to have to create an array and then call an array function (or use a pattern match), when it would be more efficient to have a function/operator that deals directly with the string. Just my two cents... Previous Comments: ------------------------------------------------------------------------ [2004-02-11 17:30:18] [EMAIL PROTECTED] if (in_array("a", array("a", "b", "c"))) works fine for this :) ------------------------------------------------------------------------ [2004-02-11 17:10:40] chris dot walsh at pni dot com Description: ------------ Looking for a comparison operator/function to similar to the mysql "in" function. This could be used to replace long if statments: if($a=="b" || $a=="c" || $a=="d") something like if(in($a,"b","c","d")) or if($a=="b"||"c"||"d") or if($a|="b","c","d") ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27225&edit=1