title: Printing an array in php
body: <p>Now I understand that you cant just use echo to print the contents of an array and you have to use foreach but for some reason this is not working. Any ideas?</p>
  
  <pre><code>$rows = $stmt-&gt;fetchAll();
  foreach ($rows as $key=&gt;$row)
         {
          echo "My value at $key is $row";
         }
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>My value at 0 is ArrayMy value at 1 is ArrayMy value at 2 is Array
  </code></pre>