note 11312 added to in_array

From: Date: Thu, 15 Feb 2001 10:27:23 +0000
Subject: note 11312 added to in_array
Groups: php.notes 
Request: Send a blank email to php-notes+get-11103@lists.php.net to get a copy of this message
It seems like in_array does not work with multidimentional arrays. i.e. $arr = array( array("one", "two"), array("tree", "four") ); $multi = in_array("two", $arr); $single = in_array("two", $arr[0]); // $multi == FALSE // $single == TRUE http://www.php.net/manual/en/function.in-array.php

« previous php.notes (#11103) next »