I have the following template that repeats itself in the results:
<table width="300" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>product</td>
</tr>
</table>
And right now I am showing 10 per page w/ a pager. I want to be able to count the repeated template and insert a banner ad after the template repeats 5 times. So it would be like:
template
template
template
template
template
template
BANNER
template
template
template
template
template
Do I give the template an ID and do some type of counting? And if ID COUNT equals 5 then post banner ad? I just need to get a little jump start in the right direction.
I would like to accomplish it this way:
<table width="300" border="0" cellspacing="0" cellpadding="0" id="searchtemplate">
<tr>
<td>product</td>
</tr>
</table>
<?php include("count.php"); ?>
Can someone show me how to do this? Or post an example script that I could modify?
<table width="300" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>product</td>
</tr>
</table>
And right now I am showing 10 per page w/ a pager. I want to be able to count the repeated template and insert a banner ad after the template repeats 5 times. So it would be like:
template
template
template
template
template
template
BANNER
template
template
template
template
template
Do I give the template an ID and do some type of counting? And if ID COUNT equals 5 then post banner ad? I just need to get a little jump start in the right direction.
I would like to accomplish it this way:
<table width="300" border="0" cellspacing="0" cellpadding="0" id="searchtemplate">
<tr>
<td>product</td>
</tr>
</table>
<?php include("count.php"); ?>
Can someone show me how to do this? Or post an example script that I could modify?