Easy Tutorial
❮ Func Array Slice Php Debug_Zval_Dump Function ❯

PHP attributes() Function

PHP SimpleXML Reference Manual

Example

Returns the attributes and values of the body element in the XML:


Definition and Usage

The attributes() function returns the attributes and values of an XML tag.


Syntax

Parameter Description
ns Optional. Specifies the namespace of the attribute to be retrieved.
is_prefix Optional. A boolean value. TRUE if ns is a prefix, FALSE if ns is a URI. Default is FALSE.

Technical Details

Return Value: Returns a SimpleXMLElement object if successful.
PHP Version: 5.0.1+
--- ---
❮ Func Array Slice Php Debug_Zval_Dump Function ❯