title: Best way to debug an array using PHP
body: <p>What is the best way to debug an array so that you can see what values are being stored and in what keys in the array they are being stored at? Also how do you make it so that it's easier to look at visually so that you don't have to keep looking through the array for the key and it's value in the one line <code>print_r()</code> function?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I now realize that <code>print_r()</code> is not the only solution to debugging arrays. So if you have alternate solutions that would be lovely as well to learn more about debugging.</p>
  
  <p><strong>EDIT2:</strong></p>
  
  <p><a href="https://stackoverflow.com/users/784877/ayesh-k">Ayesh K</a>, <a href="https://stackoverflow.com/users/463693/itroubs">ITroubs</a> and <a href="https://stackoverflow.com/users/1987838/robert-rozas">Robert Rozas</a> have mentioned both <a href="http://sourceforge.net/projects/krumo/" rel="nofollow noreferrer">Krumo</a> and <a href="http://raveren.github.io/kint/" rel="nofollow noreferrer">Kint</a> this far, if you have others feel free to post them. Also thanks to <a href="https://stackoverflow.com/users/179104/raveren">Raveren</a> for writing Kint!</p>