php xml get value of node
How can I get "bla" in the below dump of my node Essentially bla is what is contained in my node
<mynode name="myvalueone" display="myvalue2">bla</mynode>
object(SimpleXMLElement)[21]
publi开发者_Python百科c '@attributes' =>
array
'name' => string 'myvalueone' (length=65)
'display' => string 'myvalue2' (length=9)
string 'bla' (length=3)
You can obtain the value by casting the SimpleXMLElement to a string like this: $value = (string)$element;
精彩评论