Php uses the array to fill the drop-down list box, and the php array drop-down list box. Php uses an array to fill the drop-down list box. The php array drop-down list box describes how php uses an array to fill the drop-down list box. Share it with you for your reference. The method of filling the drop-down list box with arrays in php is as follows:
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:
<?php$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》
Seleccione fabricante<?phpfor($i=0; $i <?php echo $data[$i]->titulo ?><?php}?>
I hope this article will help you with php programming.
Examples in this article describes how php fills the drop-down list box with arrays. Share it with you for your reference. Details...