Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
248 views
in Technique[技术] by (71.8m points)

php - "At sign" @ in SimpleXML object?

This is the output of print_r() run on a typical SimpleXMLElement object:

SimpleXMLElement Object
(
    [@attributes] => Array
        (

        )
)

What does the @ sign mean?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This is a SimpleXMLElement object. The '@attributes' row is an internal representation of the attributes from the XML element. Use SimpleXML's functions to get data from this object rather than interacting with it directly.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...