The following php array will not just populate with values

I am using Zend Framework not that I will make any difference. Basically i am trying to store form entries and the following is the array the i create which is then passed to the instance of the table for storage. The proble is the array does not get populated. I have even just tried assingning a string literal and still when i echo I don’t get any value. However if i echo the values outside of the array it works.


    public function save(Application_Model_Members $members)
    {
        //$this->session->group_id = $members->getGroupsId();


        $data = array(
            'id' => strtoupper(uniqid('GB')),
            'groups_id' => $members->getGroupsId(),
            'title' => $members->getTitle(),
            'first_name' => $members->getFirstName(),
            'surname' => $members->getSurname(),
            'date_of_birth' => $this->_formatDateToUS($members->getDateOfBirth()),
            'gender' => $members->getGender(),
            'marital_status' => $members->getMaritalStatus(),
            'mobile' => $members->getMobile(),
            'home_number' => $members->getHomeNumber(),
            'postal_address' => $members->getPostalAddress(),
            'address_line1' => $members->getAddressLine1(),
            'address_line2' => $members->getAddressLine2(),
            'type_of_accommodation' => $members->getTypeOfAccommodation(),
            'other_detail' => $members->getOtherDetail(),
            'loan_cycle_number' => $members->getLoanCycleNumber(),
            'date_created' => date('Y-m-d H:i:s'),
        );

            $this->getDbTable()->insert($data);

    }

I use the same approach for another table and it works fine. I am using Netbeans btw

Sorry my bad, i figured it out. The problem was ‘surname’ => $members->getSurname(), there was an error in the name of the variable getSurname() was returning. It had the $ added to it.

Thanks