I'm trying to create a form with Phalcon. I'm fetching some data
$locationsOrganisation, that looks like this:
id locationId organisationId location name location metadata organisation name organisation metadata
However, I'm having some troubles. The part that's going wrong is in this line:
"using" => array("locationId", "name"), since the
name is actually inside another array called
location. How can I access that?
// Location $locationsOrganisation = LocationsOrganisations::find(array( 'conditions' => 'organisationId = 1' )); $location = new Select("location", $locationsOrganisation, array( 'using' => array('locationId', 'name'), 'useEmpty' => true, 'emptyText' => 'Choose your restaurant', 'emptyValue' => null, 'class' => 'input-field--selectbox' )); $this->add($location);