Codeigniter doğrulama

1 Cevap php

I have many goals to be printed on the screen. but it shows error when i use it like this

echo $this->validation->rshort_goal.$i;

Bunu kullanmak için doğru yolu nedir?

if($sgoal !='')
{
    $scount = count($sgoal);
    $i =1;
    foreach($sgoal as $row)
    {
      <textarea name="rshort_goal<?php print $i;?>" id="short_goal" class="short_go">
      <?php if($this->validation->rshort_goal.$i)
                { 
                  echo $this->validation->rshort_goal.$i;
                }             
               elseif($this->validation->rshort_goal.$i._error !='') 
               { echo ''; } 
               else 
               {echo $$row->goal_description; }
           ?>
     </textarea>
        <?php
    $i++;
    }
}

1 Cevap

Belki de böyle bir fonksiyon çağırmak istiyoruz?

call_user_func($this->validation, 'rshort_goal' . $i);