ihris

litlfred

Mar 2nd, 2011
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. $cost = 0;
  2. foreach ( array('lodging','local_transport','transport','other') as $cost) {
  3.     if (!array_key_exists($cost,$this->fields) || ! $this->fields[$cost] instanceof I2CE_FormField_INT) {
  4.        I2CE::raiseError("Field $cost is not an INT");
  5.        continue;
  6.     }
  7.     $cost += $this->inflateCosts($year_offset,max(0,$this->fields[$cost]->getValue());
  8.  
  9. }
Add Comment
Please, Sign In to add comment