标签:ar as php text class print c 数组 string
var_dump 判断一个变量的类型与长度如:
<?
$a = 1;
$b = ‘t‘;
echo var_dump($ta,$tb); // 结果为 int(123) string(3) "abc"
?>
echo仅输出变量或字串
<?
$a = "abc";
echo $a; //输出 abc
//or
echo "abc"; //输出 abc
?>
print_r输出数组
<?
$a = array(‘a‘,‘b‘,‘c‘);
print_r($a); // 输出 Array ( [0] => a [1] => b [2] => c )
?>
【PHP】打印输出var_dump+echo+print_r
标签:ar as php text class print c 数组 string
原文地址:http://www.cnblogs.com/huxiaoyun90/p/4052143.html