note 80717 added to function.simplexml-element-addChild

From: Date: Wed, 30 Jan 2008 01:12:07 +0000
Subject: note 80717 added to function.simplexml-element-addChild
Groups: php.notes 
Request: Send a blank email to php-notes+get-135573@lists.php.net to get a copy of this message
Object cloning ... So using the 'clone' keyword here lets you work on $new separately, and attributes added to $new don't show up in $sxe without the 'clone' all changes to $new will be reflected in the larger $sxe tree $new = clone $sxe->AddChild("comment",$comment); $new->AddAttribute("name",$name); $new->AddAttribute("url",$url); $new->AddAttribute("ip",$ip); $new->AddAttribute("time",$time); ---- Server IP: 193.95.141.37 Probable Submitter: 86.43.88.90 ---- Manual Page -- http://www.php.net/manual/en/function.simplexml-element-addChild.php Edit -- https://master.php.net/note/edit/80717 Del: integrated -- https://master.php.net/note/delete/80717/integrated Del: useless -- https://master.php.net/note/delete/80717/useless Del: bad code -- https://master.php.net/note/delete/80717/bad+code Del: spam -- https://master.php.net/note/delete/80717/spam Del: non-english -- https://master.php.net/note/delete/80717/non-english Del: in docs -- https://master.php.net/note/delete/80717/in+docs Del: other reasons-- https://master.php.net/note/delete/80717 Reject -- https://master.php.net/note/reject/80717 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#135573) next »