title: javascript error with php variable passing in codeigniter
body: <pre><code>function something(frm,i){
  //var ch=frm.outof1.value;
  for(var j=1;j&lt;=i;j++)
  {
      //var b="outof" + j;
      alert(frm.outof+j.value);
  
  }
  //alert("outof" + i);
  return false;
  }
  
   $js='onClick="something(this.form,\''. $ii .'\')"';
    echo form_button('mybutton', 'Click Me', $js);
  </code></pre>
  
  <p>and getting output NAN
  where in html this is // echo form_input('outof'.$i,''); // the form input.</p>