首页 >后端开发 >php教程 >PHP学习笔记之显示数组与对象示例

PHP学习笔记之显示数组与对象示例

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-06-23 13:40:501018浏览





显示数组与对象






  $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 "
";
?>



声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn