Skip to content

Instantly share code, notes, and snippets.

@Akii
Created August 1, 2013 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Akii/6134291 to your computer and use it in GitHub Desktop.
Save Akii/6134291 to your computer and use it in GitHub Desktop.
$resultArray = array();
foreach ($data as $object){
$resultArray[] = array(
'firm' => $object->getFirma(),
'anschr' => $object->getAnschrift()
);
}
$this->view->assign('json', json_encode($resultArray));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment