2014-09-21 I wanted to send the output the PHP function print_r() by mail(). Usually print_r() prints the result instead of returning it back as a string. The solution I found was: ob_start(); print_r($foo); $data = ob_get_contents(); ob_end_clean(); Later I discovered print_r()'s second parameter. Setting it to true changes print_r() exactly in the way I wanted. That's the difference between concentrated documentation reading and quick web searches. http://marmaro.de/lue/ markus schnalke