info about link
: Javascript Index : PHP : MySQL :
in_array
: Source : : Explanation : : Example : : Todo : : Feedback :

in_array.js

check whether a certain value exists in an array

Added: 2006-04-28 08:35:34

download

/******
* You may use and/or modify this script as long as you:
* 1. Keep my name & webpage mentioned
* 2. Don't use it for commercial purposes
*
* If you want to use this script without complying to the rules above, please contact me first at: marty@excudo.net
* 
* Author: Martijn Korse
* Website: http://devshed.excudo.net
*
* Date:  2006-04-28 08:35:34
***/

 function inArray(needle, haystack)
 {
	for (var i in haystack)
	{
		if (needle == haystack[i])
			return true;
	}
 }

download

=[Disclaimer]=     © 2005-2018 Excudo.net