Re: XML_FastCreate child appending

From: Date: Wed, 07 Jul 2004 08:02:47 +0000
Subject: Re: XML_FastCreate child appending
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13514@lists.php.net to get a copy of this message
Le mer 07/07/2004 à 07:49, Sönke Ruempler a écrit : > > You can't, but you can do : > > $x->div( > > $x->span("blahblub") > > ); > > > > or : > > $blah = $x->span("blahblub"); > > $x->div($blah); > > > > What is the purpose please ? > > In the case that i open a tag but i don't know which and how many childs > follow, i was looking for a method to add the childs dynamicly, not in one > step. > > With you second example there is the problem again that i can add one child > but then cannot append more childs to the div tag, right? Yes, you must construct $blah before, and call the $x->div($blah) after.

« previous php.pear.general (#13514) next »