2011-07-21 16 views

回答

0

请参阅使$ after_every = 0,并添加while循环

然后加一个条件

if($after_every%3==0){ Show add} 

我认为它的工作原理$ after_every ++底部。

0

我不明白为什么你在那里使用模数。 http://php.net/manual/en/language.operators.arithmetic.php

我认为这是你不想要的。 我usualy做到这一点的方法是:

if($ad_counter >= 3) { 
$ad_counter = 0; 
echo '<h2 style="color:red;">Advertisement or custom content here</h2>'; 
} 

而且你可以删除线12 :)

相关问题