title: how to assign array to $model in yii
body: <p>Sorry. I was shorten my question because i was consider that, those users who work on yii can easily understand my question but now i am modifying so you can easily understand.</p>
  
  <p>I want to update two different table at a time through single controller/view.</p>
  
  <p><strong>_form.php (update form)</strong></p>
  
  <pre><code>&lt;div class="form"&gt;
  
  &lt;?php $form=$this-&gt;beginWidget('CActiveForm', array(
      'id'=&gt;'verse-form',
      'enableAjaxValidation'=&gt;true,
  )); ?&gt;
  
      &lt;p class="note"&gt;Fields with &lt;span class="required"&gt;*&lt;/span&gt; are required.&lt;/p&gt;
  
      &lt;?php echo $form-&gt;errorSummary($model); ?&gt;
  
      &lt;div class="row"&gt;
          &lt;?php echo $form-&gt;labelEx($model,'topic_id'); ?&gt;
          &lt;?php echo $form-&gt;textField($model,'topic_id', $model-&gt;topic_id); ?&gt;
          &lt;?php echo $form-&gt;error($model,'topic_id'); ?&gt;
      &lt;/div&gt;
  
      &lt;div class="row"&gt;
          &lt;?php echo $form-&gt;labelEx($model,'sorah_id'); ?&gt;
          &lt;?php echo $form-&gt;textField($model,'sorah_id', $model-&gt;topic_id); ?&gt;
          &lt;?php echo $form-&gt;error($model,'sorah_id'); ?&gt;
      &lt;/div&gt;
  
      &lt;div class="row"&gt;
          &lt;?php echo $form-&gt;labelEx($model,'verse_text'); ?&gt;
          &lt;?php echo $form-&gt;textArea($model,'verse_text',array('rows'=&gt;6, 'cols'=&gt;50)); ?&gt;
          &lt;?php echo $form-&gt;error($model,'verse_text'); ?&gt;
      &lt;/div&gt;
  
      &lt;?php
  
              $trans = array();
  
          foreach($model-&gt;verseTranslations as $p)
                  {
                  $trans[$p-&gt;id] = $p-&gt;translation_text;
                  }
  
  
      ?&gt;
      &lt;div class="row buttons"&gt;
          &lt;?php echo CHtml::submitButton($model-&gt;isNewRecord ? 'Create' : 'Save'); ?&gt;
      &lt;/div&gt;
  
         &lt;?php $this-&gt;endWidget(); ?&gt;
  
  &lt;/div&gt;&lt;!-- form --&gt;
  </code></pre>
  
  <p>I have an array in my _form.php file.</p>
  
  <pre><code>&lt;?php
  
  $trans = array();
  foreach($model-&gt;verseTranslations as $p)
  {
    $trans[$p-&gt;id] = $p-&gt;translation_text;
  }
  
  ?&gt;      
  </code></pre>
  
  <p>if i write <code>print_r($trans);</code> Its output like this.</p>
  
  <pre><code>Array ( [3] =&gt; In the name of ALLAH, most Gracious, most Compassionate. [4] =&gt; شروع الله کا نام لے کر جو بڑا مہربان نہایت رحم والا ہے [5] =&gt; En el nombre de Alá, el Compasivo, el Misericordioso ) 
  </code></pre>
  
  <p>Now I want to assign this variable i.e. <code>$trans</code> to <code>$model</code> in _form.php file of yii framework, so that i easily access it on controller and then easily submit it to the separate table.
  I also want to use it in textArea.</p>
  
  <p>Hope you understand my question.</p>
  
  <p>Any help will be appreciated.</p>
  
  <p>Thanks.</p>