PHP学习笔记之显示数组与对象示范
程序员文章站
2024-04-05 10:00:36
...
PHP学习笔记之显示数组与对象示例
显示数组与对象
$a = array(1, 2, array("aa", "bb", "cc"));
echo $a; echo "
";
print_r($a); echo "
";
var_dump($a); echo "
";
var_export($a); echo "
";
$b = var_export($a, true);
echo $b; echo "
";
print_r($b); echo "
";
var_dump($b); echo "
";
$c = array ( 0 => 1, 1 => 2, 2 => array ( 0 => 'aa', 1 => 'bb', 2 => 'cc', ), );
echo $c; echo "
";
print_r($c); echo "
";
var_dump($c); echo "
";
?>
$a = array(1, 2, array("aa", "bb", "cc"));
echo $a; echo "
";
print_r($a); echo "
";
var_dump($a); echo "
";
var_export($a); echo "
";
$b = var_export($a, true);
echo $b; echo "
";
print_r($b); echo "
";
var_dump($b); echo "
";
$c = array ( 0 => 1, 1 => 2, 2 => array ( 0 => 'aa', 1 => 'bb', 2 => 'cc', ), );
echo $c; echo "
";
print_r($c); echo "
";
var_dump($c); echo "
";
?>
相关文章
相关视频
上一篇: redis怎么实现消息队列
下一篇: php session 过期时间问题