PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

SimpleXMLElement::__toString - Returns the string content | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

SimpleXMLElement::__toString

(バージョン情報なし。おそらく SVN 版にしか存在しないでしょう)

SimpleXMLElement::__toStringReturns the string content

説明

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.

パラメータ

この関数にはパラメータはありません。

返り値

Returns the string content on success or an empty string on failure.

例1 Get string content

<?php
$xml 
= new SimpleXMLElement('<a>1 <b>2 </b>3</a>');
echo 
$xml;
?>

上の例の出力は以下となります。

1 3

参考


忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「SimpleXMLElement::__toString - Returns the string content」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | SimpleXMLElement::__toString - Returns the string content」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: