Hi there I am making my Bootstrap Site (Gold) PHP7 compatible.  I have worked my way through all the changes on GitHub and all is well. Except I have  a non standard piece of code which is a discount module. The pieces of code below are to places where i need to change the while and each. I have tried a number of ways based on comparing other changes but I can't get it working. Could someone please help with this last piece in the puzzle. function total() { reset($this->discounts); $total = 0; while (list($type, ) = each($this->discounts)) { $total = $total + $this->discounts[$type]['amount']; } return $total; } and the second function get_all() { $discounts_array = array(); reset($this->discounts); while (list($type, ) = each($this->discounts)) { $discounts_array[] = array('description' => $this->discounts[$type]['description'], 'amount' => $this->discounts[$type]['amount']); } return $discounts_array; } I thought it would be something like this function get_all() {
      $discounts_array = array();
     
               foreach($this->discounts as $type) {
          $discounts_array[] = array('description' => $this->discounts[$type]['description'],
                                     'amount' => $this->discounts[$type]['amount']);
      }
      return $discounts_array;
    }   but alas it is not All help appreciated Doug