Re: Class Function Problem

From: Date: Tue, 10 Dec 2002 21:10:13 +0000
Subject: Re: Class Function Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-127720@lists.php.net to get a copy of this message
Where is the array $tools defined? The count() function returns the number of elements in a variable (in this case an array). It is seeing that there are 0 elements in the $tools array and therefore your script is trying to divide 100 by 0 which will spit out a warning every time. Should $tools be $toolsneeded instead? ----- Original Message ----- From: "Sean Mayhew" <seanmayhew@hotmail.com> To: <reason@stny.rr.com> Sent: Tuesday, December 10, 2002 3:59 PM Subject: Re: [PHP] Class Function Problem : while(list($name,$url) = each($tools)) : : : >From: "Rodney Green" <reason@stny.rr.com> : >To: <seanmayhew@hotmail.com> : >CC: <php-general@lists.php.net> : >Subject: [PHP] Class Function Problem : >Date: Tue, 10 Dec 2002 15:58:09 -0500 : > : >What is on line 251? : > : > >Warning: Variable passed to each() is not an array or object in : > >/home/www/website/admin/include/adminclass.php on line 251 : > : > : >-- : >PHP General Mailing List (http://www.php.net/) : >To unsubscribe, visit: http://www.php.net/unsub.php : : : _________________________________________________________________ : MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. : http://join.msn.com/?page=features/virus : :

« previous php.general (#127720) next »