1 2 3 4
<?php $xml = '<foo>bar <child />bob</foo>'; $sx = simplexml_load_string($xml); echo 'Combined text content is: ', (string)$sx;
1
Combined text content is: bar bob