Store contents of an array export into a new variable
Posted 06 April 2006 - 06:06 PM
Also, is there such a thing as a "Pretty" Variable Dump? Maybe a loop that would store the array in a pretty string format?
It's not important enough that it needs to be formatted to look nice, but there is a lot of information coming from the form.
Thanks so much!
Posted 06 April 2006 - 06:16 PM
<?php ob_start(); var_dump($_POST); $var = ob_get_contents(); ob_end_clean(); ?>The output of var_dump($_POST) is now in $var.
Posted 06 April 2006 - 06:24 PM
Posted 06 April 2006 - 06:26 PM
So to send in email, you can do
<?php $body = print_r($_POST,true); ?>If you just want to display it on the screen, do
<?php echo '<pre>' . print_r($_POST,true) . '</pre>'; ?>
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users