Home > Article > Backend Development > How to use an array to fill a drop-down list box in PHP_PHP Tutorial
This example describes how PHP uses an array to fill a drop-down list box. Share it with everyone for your reference. The specific implementation method is as follows:
4 11 12 |
<🎜>$data = array(<🎜>
<🎜>(object)array("titulo"=>"Ford", "valor"=>"opcion1"),
(object)array("titulo"=>"Peugeot", "valor"=>"opcion2"),
(object)array("titulo"=>"Chevrolet", "valor"=>"opcion3"),
(object)array("titulo"=>"Volskwagen", "valor"=>"opcion4"),
);
?>
|