(PHP 5 >= 5.1.3, PHP 7)
Adds an attribute to the SimpleXML element
public void SimpleXMLElement::addAttribute ( string $name [, string $value [, string $namespace ]] )
Adds an attribute to the SimpleXML element.
Parameters:
name
The name of the attribute to add.
value
The value of the attribute.
namespace