最新版本的print_r($ _ POST)

I'm trying to creating a php program that simply does the same thing as print_r(), but in a neater format. I created a form that just has some checkboxes and radio buttons and when the user hits the submit button, it takes them to another page that shows them the values of what they picked. I planned on using a foreach statement, but I'm having trouble with the syntax. Here's what I came up with in my pseudocode

foreach($_POST as X=>Y)
    echo ("For ".X." you entered ".Y."<br>");

What I'm unsure of is what X and Y would be. Is there a way I can read the print_r($_POST) into a variable and display it how I want to?

A nicer way is to get xdebug module and turn on HTML display (see http://xdebug.org/docs/display) and it will make it look nicer.

You could also look at kurmo http://krumo.sourceforge.net which is a nice tree view of print_r