Zend_Json::encode

$temp = array();
foreach($this->people as $item){
$temp[] = array($item->dob,$item->name);
}
echo Zend_Json::encode($temp);

Advertisements