How to echo out dynamic checkboxes?
<p>I have problems displaying my checkboxes. Can anyone please help? I search the solution online and I tried the codes but it doesn't work.</p>

<p>Here is my codes</p>

<pre><code>&lt;?php
include "mysqli.connect.php";
// Make a MySQL Connection
$retrieveflavor = "SELECT * FROM flavor"; 
$result = $mysqli-&gt;query($retrieveflavor);  
while ($row = $result-&gt;fetch_array(MYSQLI_ASSOC))
{
    //echo "&lt;input type='checkbox' name='candyFlavors[]' value=".$row['flavorname']."/&gt;";
    //echo "&lt;input type=\"checkbox\" name=\"candyFlavors[]\" value=\"$row[flavorname]\"&gt;";
    //echo "&lt;input name=\"candyFlavors[]\" type='checkbox' value='"$row[flavorname]"'/&gt;";
    echo "&lt;td&gt;&lt;img src=".$row['image']." width='240px' height='190px'&gt;&lt;/td&gt;";
    echo "&lt;input type=\"checkbox\" name=\"candyFlavors[]\" value=\"$row[flavorname]\"&gt;";
}
?&gt;
</code></pre>
