Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $items = [
- ['sort' => 1],
- ['sort' => 3],
- ['sort' => 5],
- ['name' => 'item 1'],
- [
- ['sort' => 8],
- ['sort' => 10],
- ]
- ];
- $sum = 0;
- /* foreach ($items as $key => $item) {
- foreach ($item as $key => $sort){*/
- foreach ($items as $item) {
- $sum += $item['sort'];
- }
- echo $item[1];
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement