How to convert a PHP object to a string?

Posted by Rohan on Stack Overflow See other posts from Stack Overflow or by Rohan
Published on 2010-03-29T12:23:47Z Indexed on 2010/03/29 12:33 UTC
Read the original article Hit count: 155

Filed under:
|

I get this error:

Catchable fatal error: Object of class stdClass could not be converted to string

So, my question is, how do I convert an object to a string in PHP? I don't want to serialize it though.

Just a note: the code I use works in PHP 4, but not in PHP 5

Thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about php5