Examining an Array with print_r() : print_r « Utility Function « PHP






Examining an Array with print_r()

 
<html>
<head>
<title>Testing the print_r() Function</title>
</head>
<body>
<div>
<?php
$characters = array (
      array (
        "name"=> "bob",
        "occupation" => "A",
      ),
      array (
        "name" => "sally",
        "occupation" => "B",
      )
   );

print_r( $characters);

?>
</div>
</body>
</html>
  
  








Related examples in the same category

1.print_r(,true ) passes its output back as its return value, and not print anything out.