보기

2012-02-06 4 views
0
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"; 
    } 

의 배열 값에 액세스 는 I 뷰에서 $ this-> arrErrors [ 'CLIENT_NAME']로 액세스 할 수 있을까?보기

+0

위의 코드를 사용하거나 난 $ this->보기 -> arrErrors [ 'CLIENT_NAME'] = $ arrErrors [ '로 설정하지 : 여기

바로 접근법 고객 이름']; – Micheal

답변

0

바보 같은 질문에 대답 해주세요.

$this->view->arrErrors=arrErrors['client_name']; 

컨트롤러