Search code examples
zend-frameworkzend-framework-mvc

Zend Framework :: How should title html element get from view?(set view->headTitle())


Zend Framework :: How should title html element get from view?(set view->headTitle()).

Example of view title output source: (I need to get: some browser title)

<title> some browser title </title>

My Code that print huge array:

$this->view->headTitle('some browser title');//set working
echo var_export($this->headTitle()); //get not working

please help to get title element of the view.

Thanks


Solution

  • In view

    $this->headTitle('some browser title');
    echo $this->headTitle(); //<title>some browser title<title>
    echo strip_tags($this->headTitle()); //some browser title