note 42347 added to function.in-array

From: Date: Wed, 12 May 2004 22:06:08 +0000
Subject: note 42347 added to function.in-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-69538@lists.php.net to get a copy of this message
In response to Noah B: Try the code below, which will distinguish the difference between 0 & 1 and false & true: $numerals=range(0,9); $testval='foo'; //this can be anything if (in_array($testval,$numerals) === true){ echo 'this will NOT always print'; } ---- Manual Page -- http://www.php.net/manual/en/function.in-array.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42347 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42347&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42347&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#69538) next »