RE: [PHP] Everything between something becomes an array element
| From: | ArsenKirillov | Date: | Tue, 06 Nov 2001 07:57:27 +0000 |
| Subject: | RE: [PHP] Everything between something becomes an array element | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73555@lists.php.net to get a copy of this message | ||
What for is xml , here . IMHO must be only recursion even with
preg_replace_callback ;-)
> -----Original Message-----
> From: Christoph Starkmann [mailto:kiko@nfq.de]
> Sent: Monday, November 05, 2001 4:01 PM
> To: php-general@lists.php.net
> Subject: RE: [PHP] Everything between something becomes an array element
>
>
> Hi there!
>
> > Keep in mind that the first closing </tr> is where the search
> > will stop so
> >
> > <tr><td><table><tr><td>foo</td><td>bar</td></tr></table></tr>
> > will return :
> >
> > <tr><td><table><tr><td>foo</td><td>bar</td></tr>
>
> Wouldn't it be smart to do a recursive extraction here? I have been
> thinking about writing a smart little PHP-XML-Parser that is able
> to distinguish multiple tags with the same name but a different
> "parent"-tag, like
>
> <entry>
> <preview>
> <source>[preview-source here]</source>
> <width>[preview-width here]</width>
> <height>[preview-height here]</height>
> </preview>
> <original>
> <source>[original-source here]</source>
> <width>[original-width here]</width>
> <height>[original-height here]</height>
> </original>
> </entry>
>
> If you simply scan these tags (like I did before using the
> php-xml-functions :(, you cannot really distinguish the tags.
>
> entry:preview:source and
> entry:original:source etc.
> should be stored (and therefor handled) differently and both
> could be easily accessed.
>
> Anybody got experiences with this kind of stuff? Sources? Ideas?
>
> Thanks,
>
> Kiko
>
> -----
> It's not a bug, it's a feature.
> christoph starkmann
> mailto:kiko@nfq.de
> http://www.fh-augsburg.de/~kiko
> ICQ: 100601600
> -----
>