With a little side of applesauce...

Monday, February 12, 2007

PHP - print form variables to screen

I know, I know... I have been working with PHP for years... But, really... I have basically troubleshot other people's PHP for years :P Now, I am gathering some real foundational knowledge of PHP, so here is the first thing I need to remember:

print_r($_POST);

Will print the variables which were POSTed to this page. (You can use any of the $_ARRAYs in the same manner).

1 comment:

J.P. said...

This function print_r(); is actually for printing any array.

When working with an array returned by LDAP (which can be at least 3 dimentional) I found it to be an absolute must in debugging.