#27225 [Opn->WFx]: in_var function

From: Date: Wed, 11 Feb 2004 22:30:18 +0000
Subject: #27225 [Opn->WFx]: in_var function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-54784@lists.php.net to get a copy of this message
ID: 27225 Updated by: derick@php.net Reported By: chris dot walsh at pni dot com -Status: Open +Status: Wont fix Bug Type: Feature/Change Request Operating System: Linux PHP Version: 4.3.5RC2 New Comment: if (in_array("a", array("a", "b", "c"))) works fine for this :) Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#54784) next »