title: Convert an Object to a String in PHP
body: <p>I want to convert an Object into a String in PHP. Specifically, I'm trying to take a mysql query response, and I'm trying to convert it into something I can write to a file and use later.</p>
  
  <p>Of course, when you try to write an Object to a file, PHP appropriately yells: <strong>Catchable fatal error: Object of class DB_result could not be converted to string in .....</strong></p>
  
  <p>Alternatively, if there is some other way of writing the result of a mysql query to a file, that works too. I'm playing around with a home-brewed caching project :)</p>