update : 2015.11.03
php.shukuma.com

검색:
 
 
Returns the string content

SimpleXMLElement::__toString

(No version information available, might only be in Git)

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.

예제

Example #1 Get string content

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

위 예제의 출력:

1 3

참고