<!DOCTYPE html>
<html>
<body>
<?php
$firstname = "Bill";
$lastname = "Gates";
$age = "60";
$result = compact("firstname", "lastname", "age");
print_r($result);
?>
</body>
</html>
输出结果:
Array ( [firstname] => Bill [lastname] => Gates [age] => 60 )
博客内容展示了一个数组输出结果,包含 firstname 为 Bill、lastname 为 Gates、age 为 60 等信息,体现了数组在存储和输出数据方面的应用。
117

被折叠的 条评论
为什么被折叠?



