Advertisement
Guest User

Untitled

a guest
May 3rd, 2015
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.03 KB | None | 0 0
  1.         /** -----------------------------------------
  2.          * Blinds
  3.         -------------------------------------------*/
  4.  
  5.         $blindArray = array();
  6.  
  7.         /**
  8.          * Loop through the dynamic fields added
  9.          * by the user.
  10.          */
  11.         foreach($data['BlindWidth'] as $key => $value) {
  12.             $blindArray[$key]['Width'] = $value;
  13.         }
  14.         foreach($data['BlindHeight'] as $key => $value) {
  15.             $blindArray[$key]['Height'] = $value;
  16.         }
  17.  
  18.         /**
  19.          * Loop through the Blinds Array and add
  20.          * each of the items to an ArrayList() to
  21.          * be looped through in the template.
  22.          */
  23.         $arrayList = new ArrayList();
  24.         foreach($blindArray as $key => $item){
  25.             $arrayList->push(new ArrayData(array(
  26.                 'Width' => $item['Width'],
  27.                 'Height' => $item['Height']
  28.             )));
  29.         }
  30.  
  31.         /**
  32.          * Set the blinds data for the Email template.
  33.          */
  34.         $data['Blinds'] = $arrayList;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement