Php uses the array to fill the drop-down list box. Php: how to fill the drop-down list box with arrays. This article describes how to fill the drop-down list box with arrays in php. Share it with you for your reference. The specific implementation method is as follows: 12 php uses the array to fill the drop-down list box
This example describes how to fill the drop-down list box with arrays in php. Share it with you for your reference. The specific implementation method is as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
$ 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 "), ); ?> Script Function onCambioDeOpcion (combobox ){ Alert ("Seleccionaste:" + combobox [combobox. selectedIndex]. text + "\ NSu valor es:" + combobox. value ); } Script Onchange = "onCambioDeOpcion (this)"> Seleccione fabricante For ($ I = 0; $ I { ?> Titulo?> } ?> |
Examples in this article describes how php fills the drop-down list box with arrays. Share it with you for your reference. The specific implementation method is as follows: 1 2...