Jump to content

accessing array in view


php_begins

Recommended Posts

    I have the following code in zend:

 

$arrErrors=array();
     if (!empty($this->post['submit']))
    {
    // Each time theres an error, add an error message to the error array
           // using the field name as the key.
          if (empty($this->post['client_name']))
      $arrErrors['client_name'] = "Please Enter Client's name as it appears in the carrier software";
    }

if i set $this->view->arrErrors=$arrErrors in the controller,

Can I access it as $this->arrErrors['client_name'] in the view?

Link to comment
https://forums.phpfreaks.com/topic/256555-accessing-array-in-view/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.