Need Help Converting to an array
Posted: Fri Jul 11, 2003 11:23 pm
I have a template which holds this data:
Is there any possible way to store each and every one of those blocks in an array?
i.e. given the template above, i should wind up with this array
Code: Select all
<HTML>
<HEAD>
<TITLE>SMTemplates V1.00</TITLE>
<STYLE>
td,body{font-family:tahoma; font-size: 11px; color:black}
</STYLE>
</HEAD>
<BODY>
<b>This file demonstrates the use of SMTemplates.</b><br><br>
This is header.tpl<br>
{{ID1}}<br>
{{ID2}}<br>
<!-- BEGIN SUBBLOCK -->
<!-- BEGIN SUBBLOCK1 -->
IM IN SUBBLOCK1
<!-- END SUBBLOCK1 -->
IM IN SUBBLOCK<br>
<!-- END SUBBLOCK -->i.e. given the template above, i should wind up with this array
Code: Select all
TEMPLATE = array(
їMAIN] = <HTML>
<HEAD>
<TITLE>SMTemplates V1.00</TITLE>
<STYLE>
td,body{font-family:tahoma; font-size: 11px; color:black}
</STYLE>
</HEAD>
<BODY>
<b>This file demonstrates the use of SMTemplates.</b><br><br>
This is header.tpl<br>
{{ID1}}<br>
{{ID2}}<br>
їSUBBLOCK] = array (
їSUBBLOCK1] = array (
ї0] = IM IN SUBBLOCK1
)
ї1] = IM IN SUBBLOCK<br>
)
)