我已经看到了所有与我相关的问题,但仍然没有找到解决我的“简单”问题的方法。我有一个 3 维数组,我只想显示结果。但是当我回应时,. "<td>".$person ['job']."</td>"我收到了错误。任何建议thnx
$people= array(
array(
"name" => "Jennifer Kimbers",
"age"=>"45",
"email" => "abc@gmail.com",
"city" => "Seattle",
"state" => "Washington"),
array(
"job"=>"web developer"
),
array(
"name" => "Rodney Hutchers",
"age"=>"55",
"email" => "def@gmail.com",
"city" => "Los Angeles",
"state" => "California"),
array(
"job"=>"data developer"
);
echo "<table>"
."<th>FullName</th>"
."<th>Age</th>"
."<th>Email</th>"
."<th>City</th>"
."<th>State</th>"
."<th>Job</th>";
foreach ($people as $person) {
echo "<tr>"
. "<td>" . $person ['name'] . "</td>"
. "<td>" . $person ['age'] . "</td>"
. "<td>" . $person ['email'] . "</td>"
. "<td>" . $person ['city'] . "</td>"
. "<td>" . $person ['state'] . "</td>"
. "<td>" . $person ['job'] . "</td>"
. "</tr>";
}
echo "</table>";
翻过高山走不出你