Thread: PHP help needed
View Single Post
Old 2006-06-04, 03:14 PM   #3
tickler
If there is nobody out there, that's a lot of real estate going to waste!
 
tickler's Avatar
 
Join Date: Dec 2003
Posts: 2,177
Actually your code will still be a little screwy.
If #TGPs = #FS then they will be displayed with both loops. Your >= and <= overlap.

Look at this
PHP Code:
$numfs=count($fslinks);
$numtgp=count($tgplinks);
$maxLoop $numtgp;
if(
$numfs $numtgp) {
$maxLoop $numfs;
}

for(
$i=0;$i<$maxLoop;$i++){

if(
$i <= $numtgp) {
$tgp=explode("|",$tgplinks[$i]);
print(
"<a href=$tgp[0]>$tgp[4]</a><br>$tgp[2]<br><br>\n");
}
if(
$i <= $numfs) {
$fs=explode("|",$fslinks[$i]);
print(
"<a href=$fs[0]>$fs[4]</a><br>$fs[2]<br><br>\n");
}


__________________
Latina Twins, Solo, NN, Hardcore
Latin Teen Cash
tickler is offline   Reply With Quote