php问题,nothing_here没有输出吗?
本文介绍了php问题,nothing_here没有输出吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
<?php
$city = "San Francisco";
$state = "CA";
$event = "SIGGRAPH";
$location_vars = array("city", "state");
$result = compact("event", "nothing_here", $location_vars);
print_r($result);
?>
以上例程会输出:
Array
(
[event] => SIGGRAPH
[city] => San Francisco
[state] => CA
)
解决方案
你看下compact的定义啊!变量不存在,他怎么输出啊……
这篇关于php问题,nothing_here没有输出吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文