Re: in_array error

From: Date: Thu, 29 Nov 2001 20:19:43 +0000
Subject: Re: in_array error
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-76095@lists.php.net to get a copy of this message
You will not be able to use this and many other functions on a php3 only machine. For your convenience, all of the function references in the manual state which versions of php support them and which do not. Fred Steve Osborne <s.osborne@chinookmultimedia.com> wrote in message news:008401c17916$dd87f200$6e00a8c0@chinook.ualberta.com... > I'm using php 4 on my machine, however the server that I am testing on only > supports php3.... > > ----- Original Message ----- > From: "Gerard Onorato" <gonorato@desktoplive.com> > To: "Steve Osborne" <s.osborne@chinookmultimedia.com>; "PHP-General > (E-mail)" <php-general@lists.php.net> > Sent: Thursday, November 29, 2001 11:29 AM > Subject: RE: [PHP] in_array error > > > > Steve, > > > > What version of PHP are you running. in_array is >= 4.0. is_array was in > 3.0 > > so this may be an issue for you. > > > > Gerard > > > > -----Original Message----- > > From: Steve Osborne [mailto:s.osborne@chinookmultimedia.com] > > Sent: Thursday, November 29, 2001 3:08 PM > > To: PHP-General (E-mail) > > Subject: [PHP] in_array error > > > > > > Can anyone explain why I am getting the following error? > > > > Fatal error: Call to unsupported or undefined function in_array() in > > includes/chinlib21stCentury.inc on line 3131 > > > > > > Code: > > if( (is_array($List)) AND (is_array($RemoveList)) ) > > { > > $ListItems = count($List); > > sort($List); > > for($ListItem=0; $ListItem < $ListItems; $ListItem++) > > { > > file://printf("<br>List value: $List[$ListItem]<br>\n"); > > if(!(in_array($List[$ListItem],$RemoveList)) AND > (trim($List[$ListItem]) > > <> "") ) // Line 3131 > > $diff[] = $List[$ListItem]; > > } > > }elseif($debugit){ > > echo "In function ListDiff List and RemoveList are NOT arrays<BR>"; > > } > > return ($diff); > > > > > > Thanks, > > > > Steve Osborne > > Database Programmer > > Chinook Multimedia Inc. > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > > > > >

« previous php.general (#76095) next »