回答編集履歴
1
調整
test
CHANGED
@@ -1 +1,35 @@
|
|
1
1
|
単純にtrもthもforeachの中に入れ込んでしまえばよいのでは?
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
```PHP
|
6
|
+
|
7
|
+
<?php
|
8
|
+
|
9
|
+
foreach ( $menu1 as $value ) {
|
10
|
+
|
11
|
+
$send = $value[ 'send' ];
|
12
|
+
|
13
|
+
$id = $value[ 'ID' ];
|
14
|
+
|
15
|
+
$text = $value[ 'text' ];
|
16
|
+
|
17
|
+
?>
|
18
|
+
|
19
|
+
<tr>
|
20
|
+
|
21
|
+
<th scope="row" class="cf"><img src="●●.webp" alt=""/>メニュー名1</th>
|
22
|
+
|
23
|
+
<td><input type="radio" name="menu" value="<?=$send?>" id="radio<?=$id?>" <?=(isset($menu) && $menu == "$send")?"checked":""?>/>
|
24
|
+
|
25
|
+
<label for="radio<?=$id?>" class="radio"><?=$text?></label></td>
|
26
|
+
|
27
|
+
</tr>
|
28
|
+
|
29
|
+
<?php
|
30
|
+
|
31
|
+
}
|
32
|
+
|
33
|
+
?>
|
34
|
+
|
35
|
+
```
|