#native_company# #native_desc#
#native_cta#

array_key()

By Christian Dechery
on April 2, 2001

Version: 1.0

Type: Function

Category: Algorithms

License: GNU General Public License

Description: function that returns the numeric key of the array given the value, usefull when ‘walking’ thru arrays in multiple files…

function array_key($haystack,$needle)
{
	foreach($haystack as $key => $value)
	{
		if($haystack[$key] == $needle)
			return $key;
	}
	return false;
}