There should not be any problem with zeros, as long as they are in array. The warning tells you, you are not passing an array, so there must be some broken logic in your code. Try putting print_r($the_array) before line 154

Beauford.2002 wrote:

Hi,

I have a mysql database in which some values are loaded into an array - the
problem is that some fields may contain zeros. The problem is the following.
If there happens to be zeros in certain column's (which there will be from
time to time) then I get this error. How do I get around this?
Funny thing about this is I have the exact same thing duplicated on my
Windows PC and it doesn't cause this problem. (the problem one is on Linux
which is the production one). All versions of mysql, PHP, apache are the
same on both. Note that as soon as I put in a number it works fine.....

   Warning: The argument to array_sum() should be an array in
/usr/local/apache/htdocs/main/viewstats.php on line 154


TIA








--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to