Possible Duplicate:
how to convert object into string in php
I have a variable that contain some object (SimpleXML).
Can I change the type of this variable, and to assing it to this variable itself?
Like this:
$test = (string)$test;
var_dump($test);
The above code does not work, so the output is still object(SimpleXMLElement)
and not a string
.
But when I assign it another variable, like $new_test = (string)$test
it works well, and the var_dump output is string
]