I'm trying to create a radio button in a loop, but I want to assign a unique id so it becomes a group where only one radio can be selected. Is this possible? My loop duplicates the same radio and I can select every button. I only want to select one.
<?php
$i = 0;
$i = $i++;
while($i>=0)
{
echo "<input type='radio' name='test[$i++]' value='test[$i++]'>test[$i++] ";
echo "<BR>";
$i++;
}
?>
UPDATE THIS WORKS!!!
<?php
$i = 0;
while($i++ < 5)
{
echo "<input type='radio' name='test' value='test[$i]'>test[$i] ";
}
?>