note 62053 deleted from function.in-array by felipe

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: czeslaw 

----

Searching multi arrays:

	function array_multi_search( $p_needle, $p_haystack )
	{
		if( !is_array( $p_haystack ) )
		{
			return false;
		}

		if( in_array( $p_needle, $p_haystack ) )
		{
			return true;
		}

		foreach( $p_haystack as $row )
		{
			if( array_multi_search( $p_needle, $row ) )
			{
				return true;
			}
		}

		return false;
	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.