Simply make a json string such as and set as variable.
CONTROLLER:
<?php
use Phalcon\Mvc\Controller;
class IndexController extends Controller
{
public function indexAction()
{
$myArray = array('setting' => array('height' => 100 ... ) ... );
$this->view->setVar('json',json_encode($myArray));
}
}
VIEW:
<?php echo $json; ?>