Home > Backend Development > PHP Tutorial > PHP学习笔记之显示数组与对象示例

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

WBOY
Release: 2016-06-23 13:40:50
Original
997 people have browsed it





显示数组与对象






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



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template