title: Illegal offset in array
body: <p>I am trying to check array using another loop.</p>
  
  <pre><code>     for(   $i=0;$i&lt;count($allCheckBoxId);$i++  )       {
          if( $allCheckBoxId[$i] != ''){
              unset( $contactlist[$cntctnum] );
              }
       }   
  </code></pre>
  
  <p>I have named $allCheckBoxId, having contactnumber as value. Second array I have named $contactlist having contactnumber as key element.</p>
  
  <p>For particular condition I am retrieving values of first array. Means I would have contactnumber as value retrieve in first array. IF it is not null I am unsetting second element with value contactnumber. but its giving me error on <code>unset( $contactlist[$cntctnum] );</code> as <strong>Illegal offset type in unset in</strong></p>