note 80716 deleted from function.simplexml-element-addChild by james

From: Date: Wed, 30 Jan 2008 05:10:48 +0000
Subject: note 80716 deleted from function.simplexml-element-addChild by james
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-135580@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- 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);

« previous php.notes (#135580) next »