Jump to content

Print_R To Not Output To Screen


JustinK101

Recommended Posts

I know print_r prints the contents of an object, exactly what I want, but print_r forces the output to screen. Is there a way to just store the string output of print_r so I can email it? Thanks.

 

Does this work?

 

$string = print_r($my_obj);

Link to comment
https://forums.phpfreaks.com/topic/153089-print_r-to-not-output-to-screen/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.