Fred Wunderlich <[EMAIL PROTECTED]> writes:
> At 8:37 PM +0100 3/13/01, Martin Geisler wrote:
> >
> >Okay - how about the new version beta-1.9.1, is it any better?
> >
>
> Well, I guess it all depends on how you define "better". ;)
>
> Unfortunately, in_array() (in locale_common.php) is not supported in PHP
> 3+. I've run into this a lot.
Sorry about that, I should have know better. If you place this code in
a file, and then include it before the rest of the files, then I think
it should work:
<?php
function in_array($needle, $haystack) {
if (!is_array($haystack)) {
return false;
}
while (list($key, $val) = each($haystack)) {
if ($val == $needle) {
return true;
}
}
return false;
}
?>
I think we should make a file with functions like this, so that people
who are using PHP3 could include it to get access to the new function
in PHP4.
> -fred
>
>
>
>
--
Best regards,
Martin Geisler
Checkout http://www.gimpster.com for:
PHP Weather => Shows the current weather on your webpages.
PHP Shell => A telnet-connection (almost :-) in a PHP page.