|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-05-28 22:02 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 02:00:01 2025 UTC |
=========START====================== <?php $arr=array("stuff","thing","doodah","wotsit","here","and","there"); if(array_search("thing",$arr,false)){ /*will not return false here, as expected*/ print("\"thing\" was found!<br />\n"); } else{ print("\"thing\" was <b>not</b> found!<br />\n"); } print("<hr />\n"); if(array_search("stuff",$arr,false)){ /*will return false despite "stuff" being present in the array*/ print("\"stuff\" was found!<br />\n"); } else{ print("\"stuff\" was <b>not</b> found!<br />\n"); } ?> =======END============= Running standard PHP binary distribution on PWS (4.0).