次の実行結果のとおり動作するプログラム( web_tr3.php
)を作成してください。
実行結果
ヒント - web_tr3.php
<?php
$sweets = [
["id" => 1, "name" => "Biscuit", "price" => 200],
["id" => 2, "name" => "Candy", "price" => 100],
["id" => 3, "name" => "Chocolate", "price" => 300],
];
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>PHP Training</title>
</head>
<body>
<h3>Sweets</h3>
<hr>
<table border="1">
<tr>
<th>ID</th>
<th>NAME</th>
<th>PRICE</th>
</tr>
<?php foreach ($sweets as $sweet) { ?>
TODO
<?php } ?>
</table>
</body>
</html>
TODOの部分を実装してください。