title: populate checkbox dynamically in php
body: <p>I am fetching Gmail contacts using OAuth API call in PHP and it's successfully done. But while trying to insert a checkbox with each email ID I am getting difficulties.
  Here is the snippet of the <code>foreach</code> loop where the email IDs are populated:</p>
  
  <pre><code>$temp = json_decode($xmlresponse, true);
  $links = array();
  foreach($temp['feed']['entry'] as $cnt) {
      $links[] = $cnt['gd$email']['0']['address'] . "&lt;/br&gt;";
  }
  ?&gt;
  
  &lt;span&gt;&lt;?php echo implode("\n", $links); ?&gt;&lt;/span&gt;
  &lt;input type="checkbox" name="links[]" value="&lt;?php echo implode("\n", $links); ?&gt; /&gt;&lt;br /&gt;
  </code></pre>
  
  <p>It displays the email IDs, but there is no checkbox displaying here.  Can anyone please help me with this?</p>