note 43928 added to function.array-search

From: Date: Thu, 08 Jul 2004 21:46:04 +0000
Subject: note 43928 added to function.array-search
Groups: php.notes 
Request: Send a blank email to php-notes+get-72898@lists.php.net to get a copy of this message
Note however that Boolean False = 0 = "". The only way to have the search return a valid result and treat non-result as false is to start indices at 1.. The problem is that PHP always equated false to 0, but in some languages (unlike C), 0 is not false.. PHP needs a way to handle exceptions because this would be the only way to seperate a result from an error. Otherwise users will continue to make mistakes like the ones above.. ---- Manual Page -- http://www.php.net/manual/en/function.array-search.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+43928 Delete -- http://master.php.net/manage/user-notes.php?action=delete+43928&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+43928&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#72898) next »