note 100271 added to function.in-array

From: Date: Tue, 05 Oct 2010 13:40:25 +0000
Subject: note 100271 added to function.in-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-172971@lists.php.net to get a copy of this message
the 14-Jan-2006 05:44 post ( recursive in_array ) doesn't work I added some stuff to make it work: function in_arrayr( $needle, $haystack ) { $bReturn = false;; foreach ( $haystack as $v ) { if ( $needle == $v ) $bReturn = true; elseif ( is_array( $v ) ) $bReturn = in_arrayr( $needle, $v ); if ( $bReturn ) return $bReturn; } return false; } ---- Server IP: 69.147.83.197 Probable Submitter: 188.27.148.27 ---- Manual Page -- http://www.php.net/manual/en/function.in-array.php Edit -- https://master.php.net/note/edit/100271 Del: integrated -- https://master.php.net/note/delete/100271/integrated Del: useless -- https://master.php.net/note/delete/100271/useless Del: bad code -- https://master.php.net/note/delete/100271/bad+code Del: spam -- https://master.php.net/note/delete/100271/spam Del: non-english -- https://master.php.net/note/delete/100271/non-english Del: in docs -- https://master.php.net/note/delete/100271/in+docs Del: other reasons-- https://master.php.net/note/delete/100271 Reject -- https://master.php.net/note/reject/100271 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#172971) next »