hi all,
can anyone help me how to add the elemnets of an array?
like i fetch the results in an array and i want the elements to be added;
here iam having like this:
while ($row1=@mysql_fetch_array($resa)) {
$sumrbytes=$row1["abc"];
$sumsbytes=$row1["xyz"];
$counts = $row1["count"];
echo "count is $counts<BR>";
}
here $counts contains 1192,2280,9168 respectively
how do i get teh sum of these values?
i tried using
$test = array();
$test = array_count_values($row1);
when i say echo "$test[0],$test[1],$test[2]";
i don't see any results
waiting for the help in this situation
Regards
roopa