The addAttribute() function adds an attribute to the SimpleXML element.
public void SimpleXMLElement::addAttribute ( string $name [, string $value [, string $namespace ]] )
Adds an attribute to the SimpleXML element.
Parameter | Description |
---|---|
name | The name of the attribute to add. |
value | The value of the attribute. |
namespace | If specified, the namespace to which the attribute belongs. |
No value is returned.