Display the contents of an array using <pre> formatting


/ Published in: PHP
Save to your folder(s)

simply adding the tags will display the contents of the array in a much better fashion.


Copy this code and paste it in your HTML
  1. //DEBUG:print the contents of an array
  2. echo "<pre>";
  3. print_r($ARRAY);
  4. echo "</pre>";
  5. //END DEBUG

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.