title: How to get the checkbox value if readonly and not selected
body: <p>I have several check box</p>
  
  <pre><code>foreach ($result as $set){ 
      if ($set['Req']=='0')
      ?&gt;&lt;input type="checkbox" name="select[]" value="1"&gt; 
      &lt;?else?&gt;
      &lt;input type="checkbox" name="select[]" value="1" checked READONLY DISABLED&gt;?&gt;
  }
  </code></pre>
  
  <blockquote>
    <p>If req!= 0 , the checkbox will be readonly and must checked. If not ,
    allow the user check or not check</p>
  </blockquote>
  
  <p>Assume there are four checkbox generated</p>
  
  <pre><code>checkbox1 : readonly
  checkbox2 : select 
  checkbox3 : not select
  checkbox4 : readonly
  </code></pre>
  
  <p>Currently the select[] is only {1} because, readonly / not checked will not post the value 
  . How to get an select[] which is {1,1,0,1} ? Thank you</p>
  
  <p><strong>Update:
  How can i know which  checkbox is not selected  and add <code>select[] = 0</code>  if the user have not check that box?</strong></p>
  
  <p>One way i can think of is i get the total length of the array =4 in this case,
  and i can get it now</p>
  
  <p>But the problem is how can i add it to the correct position?</p>
  
  <pre><code>currently i have select[] = {1,1,1} and $len=4;
  </code></pre>