This is my code :
for($i = 0;$i<$count1;$i++){
echo '<select name="attribute['.$i.']">';
while($parent = mysql_fetch_array($query)){
//echo $parent['Name'];
echo '<option value="'.$parent['ID'].'">'.$parent['Name'].'</option>';
}//while $parent
echo '</select>';
}//for loop
My problem is why the output like this?:
<select name="attribute[0]">
<option value="2">Colour</option>
<option value="3">Size</option></select>
<select name="attribute[1]"></select>
Why this line does not contain the both option value?:
<select name="attribute[1]"></select>
Where is the logical mistake I did?