Advertisement
enissay

Enissay

Aug 13th, 2014
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. foreach ($list as $key => $elmt) {
  2.  
  3.     if ( $elmt['val'] > $limit ){
  4.  
  5.         // many cases to consider
  6.         switch ($flag) {
  7.             case 'aaa':                
  8.                 $sum += strtotime('now');
  9.                 break;              <= this breaks from the switch or the foreach ?
  10.  
  11.             case 'bbb':
  12.                 $sum += $elmt['val'];
  13.                 break;
  14.             }
  15.  
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement