ドロップダウンメニュー php5
用語解説
「while」
「for」
「print」
ドロップダウンメニュー
10歳から70歳までの選択
<select name="age" id="age"> <?php for ($i = 10; $i<=70; $i++){ print('<option value="'.i.'">' .$i. '歳</option>'); } ?> </select>
今回は繰り返しの処理
繰り返しの制御構造
「for」「while」の2種類があり、基本は「while」を使っていく。