首页 > 代码库 > php -- 特殊变量的三种输出

php -- 特殊变量的三种输出

----- 020-3outputs.php -----

 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4     <meta http-equiv="content-type" content="text/html; charset=utf-8">
 5     <title>数组</title>
 6 </head>
 7 <body>
 8 <h3>数组</h3>
 9 <pre style="font-family:微软雅黑; font-size:14pt">
10 <?php
11     $sheeps[] = "喜羊羊";
12     $sheeps[] = "美羊羊";
13     $sheeps[] = "懒羊羊";
14     echo "print_r的结果:\n";
15     print_r($sheeps);
16     echo "var_dump的结果:\n";
17     var_dump($sheeps);
18     echo "var_export的结果:\n";
19     echo var_export($sheeps);
20 ?>
21 </pre>
22 </body>
23 </html>