SimpleXMLElement::__toString
(No version information available, might only be in Git)
SimpleXMLElement::__toString — Returns the string content
Beschreibung
public string SimpleXMLElement::__toString
( void
)
Returns text content that is directly in this element. Does not return text content that is inside this element's children.
Parameter-Liste
Diese Funktion hat keine Parameter.
Rückgabewerte
Returns the string content on success or an empty string on failure.
Beispiele
Beispiel #1 Get string content
<?php
$xml = new SimpleXMLElement('<a>1 <b>2 </b>3</a>');
echo $xml;
?>
Das oben gezeigte Beispiel erzeugt folgende Ausgabe:
1 3