> http://www.phpbuilder.com/columns/bealers20000904.php3?page=1


if (!ereg("^4",phpversion())) {
    function in_array($needle,$haystack) { # we have this function in PHP4,
so for you PHP3 people
        for ($i=0; $i < count($haystack); $i++) {
            if ($haystack[$i] == $needle)

                return true;
            }
        }
    }
}

This assumes the array is numerically-indexed, and his $registered_types
ain't.  Dunno if it matters, but if you are using PHP3, you should change
the for() line to:

        while (list($i,) = each($haystack)){

Also, I dunno what he's thinking with all those ugly print statements...
Ugh! :-)

Other than that, you'd have to be more specific about what "doesn't work"...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to