How do I get the sum of all the data form $newno? If I write print $newno .... I get the list of number for example 23 34 45 33 .... How do I make the code to do this(23+ 34 +45 +33+ ....) and give me an answer. Thanksif ($row ne 0) { $number = 0; while (($number) = $sth->fetchrow_array()) { $number++; $numbergraf++; my $newno = substr($number, 0, 2); $output .=qq~ The sum of xxx is $newno ~;
In reply to calculate all the data by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |