News & Blog

Converting PHP print_r() Output to a String Variable

April 4th, 2011 - Posted by Steve Marks to PHP, Web Development.
The PHP function print_r() is great at outputting a variable in a human-readable format. What if we don’t want it to print to the screen however and instead, for example, want to include it’s output in an email? The Solution You might be suprised to learn that you don’t n...