Re: Code works fine on Apache, but not on PWS.

From: Date: Wed, 15 Aug 2001 05:08:55 +0000
Subject: Re: Code works fine on Apache, but not on PWS.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62768@lists.php.net to get a copy of this message
> 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 richard@zend.com address is an endangered species -- Use ceo@l-i-e.com 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

« previous php.general (#62768) next »