Advertisement
enissay

Enissay

Aug 13th, 2014
212
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data Copied
Advertisement