note 39757 deleted from function.in-array by felipe

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: one_eddie at tenbit dot pl 

----

I found no sample with case-insensitive in_array. Here's one i wrote:

function in_array_cin($strItem, $arItems)
{
	$bFound = FALSE;
	foreach ($arItems as str$Value)
	{
		if (strtpupper($strItem) == strtoupper($strValue))
			$bFound = TRUE;
	}
	return $bFound;	
}
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.