note 49524 added to language.types.array

From: Date: Mon, 31 Jan 2005 15:50:59 +0000
Subject: note 49524 added to language.types.array
Groups: php.notes 
Request: Send a blank email to php-notes+get-84276@lists.php.net to get a copy of this message
im using a or with a array, as you can see : if ($fn == $exclude[0] || $fn == $exclude[1]) the thing is if i have 20 arrays i would have to make some long if statement if ($fn == $exclude[0] || $fn == $exclude[1] || $fn == $exclude[2] || $fn == $exclude[3] ) etc anyone know of a quicker way of doing this? ---- Manual Page -- http://www.php.net/manual/en/language.types.array.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49524 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49524&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49524&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49524&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49524&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49524&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49524&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84276) next »