View Full Version : [PHP] Combobox dinamiche
Traxsung
28-03-2008, 00:04
Ragazzi devo realizzare delle comi bobox in php dinamiche... mi date qualche info ??
Grazie
Un semplice ciclo fa al caso tuo:
<select name="combo">
<?php
$arr=array('one' => "value1", 'two' => "value2", 'three' => "value3");
foreach ($arr as $index => $value)
echo "<option value=\"" . $index . "\">" . $value . "</option>";
?>
</select>
Traxsung
29-03-2008, 13:15
thehuge... grazie
Stasera provo e ti faccio sapere
vBulletin® v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.