首頁 >後端開發 >php教程 >PHP学习笔记之显示数组与对象示例

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

WBOY
WBOY原創
2016-06-23 13:40:50999瀏覽





显示数组与对象






  $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