custom tags
| From: | George Lantz | Date: | Tue, 06 Jul 2004 20:56:26 +0000 |
| Subject: | custom tags | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-189822@lists.php.net to get a copy of this message | ||
I am looking for a way to parse custom html tags. I would like to then
replace those tags with php/html code. Here is an example of the html
file to be parsed. Notice the "component", they are the custom tags I
wish to replace with code. I only need help in parsing the tags and
storing in a variable or array so I can work with the attributes. The
component tag will be the only tag I will need to work with.
<html>
<head>
<title>test</title>
</head>
<body>
<component name="menu" layout="horizontal" />
<component name="titlebar" />
</body>
</html>
This is what I was thinking, although if someone has better idea that is
fine. I was thinking of storing these in a multi-dimensional array. An
example might be $components[0][name][layout]. Is there code out there
already that does this?