Files
php-question-answer/Question01-StartProgram/Ex06_α.php
2026-10-09 12:33:29 +09:00

20 lines
797 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// // 配列の中に配列がある multiArray を定義
// $multiArray = [
// [1, 2, 3],
// [4, 5, 6],
// [7, 8, 9]
// ];
// // multiArray の 2 番目の配列の 3 番目の要素(値 6)を出力
// echo $multiArray[1][2] . "<br>"; // 1番目の配列(インデックス1)の2番目の要素(インデックス2)
// // 配列の中に連想配列がある userList を定義
// $userList = [
// ["name" => "Tanaka", "age" => 25, "job" => "Engineer"],
// ["name" => "Yamada", "age" => 30, "job" => "Designer"],
// ["name" => "Sato", "age" => 28, "job" => "Manager"]
// ];
// // userList から "Yamada" の "job" の値("Designer")を出力
// echo $userList[1]["job"] . "<br>"; // 2番目の配列(インデックス1)の "job" キーの値