Checkbox tag in php

Hello, tell me how to use Checkbox in the line, so that you will select multiple articles and delete. It turns out in this case for a single removal.

do
{
 printf("<p><input name='id' type='checkbox'  value='%s'><label>%s</label></p>",$myrow["id"],$myrow["name"]);
}
while($myrow = mysql_fetch_array($result));

Answer 1, Authority 100%

Output shape:

<form action="/" method="post">
<?
$i=0;
while($myrow = mysql_fetch_array($result)){
    ?>
    <input name="id[<?=$i++?>]" type="checkbox" value="<?=$myrow['id']?>"><label><?=$myrow['name']?></label>
    <?//       []    [$i],           . (   )
}
?>
<input type="submit" value=""/>
</form>

Request Processing:

<?
print_r($_REQUEST['id']); //  
if($_REQUEST['id']){
$ids = implode(',',$_REQUEST['id']);
mysql_query("delete from table where id in (".$ids.")"); //
?> <?=count($_REQUEST['id'])?> ,  id: <?=$ids;
}else{
?>  .<?}