2011-07-21 18 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 :)

相關問題