回答編集履歴
1
調整
test
CHANGED
@@ -26,9 +26,9 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
$selected=["cat"=>"","dog"=>"","rabbit"=>""];
|
29
|
+
$selected["animal"]=["cat"=>"","dog"=>"","rabbit"=>""];
|
30
30
|
|
31
|
-
$selected[$animal]=" selected";
|
31
|
+
$selected["animal"][$animal]=" selected";
|
32
32
|
|
33
33
|
|
34
34
|
|
@@ -40,11 +40,11 @@
|
|
40
40
|
|
41
41
|
<option value="">----</option>
|
42
42
|
|
43
|
-
<option value="cat"{$selected["cat"]}>猫</option>
|
43
|
+
<option value="cat"{$selected["animal"]["cat"]}>猫</option>
|
44
44
|
|
45
|
-
<option value="dog"{$selected["dog"]}>犬</option>
|
45
|
+
<option value="dog"{$selected["animal"]["dog"]}>犬</option>
|
46
46
|
|
47
|
-
<option value="rabbit"{$selected["rabbit"]}>うさぎ</option>
|
47
|
+
<option value="rabbit"{$selected["animal"]["rabbit"]}>うさぎ</option>
|
48
48
|
|
49
49
|
</select>
|
50
50
|
|
@@ -61,3 +61,5 @@
|
|
61
61
|
?>
|
62
62
|
|
63
63
|
```
|
64
|
+
|
65
|
+
※微調整しました
|