This commit is contained in:
skeeter 2001-04-22 14:18:50 +00:00
parent 92a18a3a12
commit 584ea9936d

View File

@ -186,10 +186,15 @@
}
// This is a php3/4 compliant in_array(), used only below in check_db() so far
function isinarray($needle,$haystack=array())
function isinarray($needle,$haystack='')
{
for($i=0;$i<count($haystack) && $haystack[$i] !=$needle;$i++);
return ($i!=count($haystack));
if($haystack == '')
{
settype($haystack,'array');
$haystack = Array();
}
for($i=0;$i<count($haystack) && $haystack[$i] !=$needle;$i++);
return ($i!=count($haystack));
}
function check_db()