I have a template which holds this data:
<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 -->
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.
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>
)
)
If so, would you mind posting example code to get me started?