$sum = 0;
foreach($group as $key=>$value)
{
$sum+= $value;
}
echo $sum;
More Related Contents:
- How can I increment by a value by 1 for every 50 times a foreach loop runs
- Can't echo items from array
- Warning: foreach staement
- Invalid argument supplied for foreach()
- Modify array values in foreach loop
- SELECT COUNT(*) AS count – How to use this count
- PHP foreach change original array values [duplicate]
- PHP How to determine the first and last iteration in a foreach loop?
- I have 2 dates in PHP, how can I run a foreach loop to go through all of those days?
- PHP foreach loop key value
- How can I loop through two arrays at once? [duplicate]
- select count(*) from table of mysql in php
- Strange behavior of foreach when using reference: foreach ($a as &$v) { … }
- PHP – If/else, for, foreach, while – without curly braces?
- PHP foreach with Nested Array?
- Binding params for PDO statement inside a loop
- Parsing JSON array with PHP foreach
- Unsetting array values in a foreach loop [duplicate]
- How to access first level keys of a 2d array with a foreach loop? [duplicate]
- PHP: Get the key from an array in a foreach loop [duplicate]
- Count “truthy” values in a 2d array
- Timeout a function in PHP
- PHP simple foreach loop with HTML [closed]
- Get next element in foreach loop
- endforeach in loops?
- Using SQlite3 in PHP how to count the number of rows in a result set?
- What does $k => $v in foreach($ex as $k=>$v) mean? [duplicate]
- foreach with three variables add
- display only 3 foreach result per row
- mysql count into PHP variable