Skip to content

Create nested dropdown array from database table


It is possible to load array from the database table directly when creating nested dropdown as seen in example


No, unfortunately, it's best to use array. However, you can programmatically form the array from database, and json encode the array.


while($row = mysql_fetch_assoc($result)){
    $json[] = $row;

echo json_encode($json);

Feedback and Knowledge Base