Hi!
How would I go about putting an object into a string so it can be emailed?
I'm using Pear DB and when there is an error, I want to email the $result.
I can print_r ($result) to output it to the screen. But, how would I get that same print_r output into a string/variable?
$error_dump = var_dump($result) //outputs to the screen as well :/
Thanks for any help!
Ahhhk!
How do you convert object data to a string?
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
$str = print_r($someVar,true);