Jump to content

display adsense text ad every 10th row of query results ???


rhock_95

Recommended Posts


$i = 0;

while(<some condition>) {
     if($i % 10 == 0) {
           //number evenly divided by 10
     }
     $i++;
}

 

Or:

 


$i = 0;

while(<some condition>) {
     if($i == 10) {
           $i = 0;
           //number is 10
     }
     $i++;
}


$i = 0;

while(<some condition>) {
     if($i % 10 == 0) {
           //number evenly divided by 10
     }
     $i++;
}

 

Or:

 


$i = 0;

while(<some condition>) {
     if($i == 10) {
           $i = 0;
           //number is 10
     }
     $i++;
}

 

OK thanks...but I am going to need more information on how to use this...

 

my current "While" statement looks like:

while ($row=mysql_fetch_array($result))

 

how is this effected?

 

also... where in the if statement where/how would I echo the Adsense text string?

 

thanks again...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.