Re: in_array problems (another pair of eyes?)

From: Date: Tue, 21 May 2002 17:47:47 +0000
Subject: Re: in_array problems (another pair of eyes?)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-98619@lists.php.net to get a copy of this message
On Wednesday 22 May 2002 01:45, Jas wrote: > I don't think I am using the syntax correctly, I have been looking at this > function on php.net and everything I have seen says my code should be > working. What version of php are you using? In PHP versions before 4.2.0 needle was not allowed to be an array. > if (in_array(array ('.jpg', '.jpeg'), $types)) { //this is the error line > (line 7) > print "jpg file"; } > ?> > And here is my error: > Warning: Wrong datatype for first argument in call to in_array in > upload_done.php on line 7 -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Punning is the worst vice, and there's no vice versa. */

« previous php.general (#98619) next »