ZEND: Return HTML as string using Render? -


i have:

$this->_helper->layout->disablelayout(); $this->_helper->viewrenderer->setnorender(); $this->render("voucher-list"); 

the problem is, when execute:

$this->render("voucher-list"); 

it prints information screen. want return data html string. not work:

$htmlcontent = $this->render("voucher-list"); 

how go returning information string?

if want send data json format need make array of data , use following code send data:

  $data = array(3,4,'test', 'my-name' => 3,4); //suppose data   $this->_helper->viewrenderer->setnorender(true);   $this->view->layout()->disablelayout();    echo zend_json::encode($data); 

and data in json format.

see this: zend framework json output


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -