php static dropdown list example

Solutions on MaxInterview for php static dropdown list example by the best coders in the world

showing results for - "php static dropdown list example"
Luis
08 Jan 2021
1<?php
2$toy_cars = array("Pull Back Cars","Remote Cars", "Electric Cars", "Toy Race Cars","Lightening Cars");
3$array_length = count($toy_cars);
4?>
5<select name="dynamic_data">
6<?php
7for ($i=0;$i<$array_length;$i++){
8?>
9<option value="<?=$toy_cars[$i];?>"><?=$toy_cars[$i];?></option>
10<?php
11}
12?>
13</select>