print_r.php

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Debugging Arrays</title>
    <meta charset="utf-8">
  </head>
  <body>
    <?php
    $flowers = array( "Rose", "Carnation", "Lily", "Peony", "Violet" );
    $flowers[20] = "Daffodil";	// create a gap
    ?>
<p>Using <code>print</code>:</p>
<pre>
<?php
    print $flowers;
?>
</pre>
<p>Using <code>print_r</code>:</p>
<pre>
<?php
    print_r($flowers);
?>
</pre>
  </body>
</html>