Jump to content


Photo

print_r()


  • Please log in to reply
2 replies to this topic

#1 jeremiorama

jeremiorama
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationQuébec, Québec

Posted 26 May 2006 - 01:09 PM

Hi there,

Is it normal that when I use the print_r() method, everything is displayed on a single line? I mean, even with explorer or firefox, so the problem doesn't seem to be the browser.

Does anyone know what's wrong? So that instead of having everything on a single line I can see the array correctly without having to run all the line to find my element (it becomes confusing on multiple dimension arrays.

Thanks!

-Jeremiorama

#2 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 26 May 2006 - 01:33 PM

Try enclosing it in <pre> tags..
<?php
echo "<pre>";
print_r($array);
echo "</pre>";
?>


#3 jeremiorama

jeremiorama
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationQuébec, Québec

Posted 26 May 2006 - 01:38 PM

Aaaaah, thanks a lot!!

That helps!

-Jeremiorama

-Jeremiorama




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users