Make div appear on dynamic option select
<p>I have a SELECT input that gets all of its options via the database. Below the select input, there are divs created for each option in the select. I want the user to select an option from the drop down and make the div below display. So basically the drop down are sports, and if they make a selection the sport div hidden below will load, and that div will contain all the sport positions</p>

<pre><code> &lt;select name="sport" id="select"&gt;
    &lt;?
    foreach ($getSports as $row) {
        echo '&lt;option onClick="toggle'.$row['1'].'()" onLoad="toggle'.$row['1'].'()" value="' . $row['0'] . '"&gt;' . $row['1'] . '&lt;/option&gt;';
    }
    ?&gt;

                &lt;/select&gt;
            &lt;/label&gt;
           &lt;?
    foreach ($getSports as $row) {
        echo '&lt;div id="position' . $row['1'].'" style="margin-top: 5px;display:none;"&gt;Positions:' . $row['1'].'';
        $sport = $row['0'];
            $getPositions = $model-&gt;getPositions($sport);
            foreach ($getPositions as $row2) {
                echo '&lt;label style="float:right"&gt;'.$row2['1'].'&lt;/label&gt;';
               echo '&lt;input type="checkbox" name="'.$row2['1'].'" value="'.$row2['0'].'"&gt;';
            }

        echo '&lt;/div&gt;';
    }
    ?&gt;
</code></pre>
