Forum Moderators: coopster
while($result = mysql_fetch_array( $data ))
{
echo "a bunch of HTML";
echo "<div class=\"descr\">Posted on " . date('D j M Y',$result['posted']);
echo CutText(strip_tags($result['descr'], '<example>'),100);
}
$counter = 0;
while($result = mysql_fetch_array( $data ))
{
if(($counter % 3) == 0) { #uses the modulus operator (%)
#print javascript
}
$counter++;
echo "a bunch of HTML";
echo "<div class=\"descr\">Posted on " . date('D j M Y',$result['posted']);
echo CutText(strip_tags($result['descr'], '<example>'),100);
}
good luck