I have a function that show a result but its not working this the source code
function push($element, $addchild, $attributes = array()) {
$this->_indent();
$this->xml .= '<'.$element;
foreach ($attributes as $key => $value) {
$this->xml .= ' '.$key.'="'.htmlentities($value).'"';
}
$this->xml .= ">
";
$this->stack[] = $element;
}
The result is <listing_Last_update>
in XML
I want the result like this <listing last_update="2014-08-08 14:15:16">
can you help me in this matter.