Forum Moderators: coopster
The echo above is in a while loop, what is the best way of getting the lower variable in the link to be equal to 5 times the value of j (the number that increments by 1 each time the while loop runs through).
Obviously [j]*5 will not work, so just wondering what will?
Thanks,
W.
I assume you forgot the $ in front of the $j counter variable.
It's more efficient, by the way, to put all the stuff in the while loop into a variable then echo the variable after the loop is done.
pseudocode:
while loop condition
$temp = "<a href=\"content.php?categ=$categ&lower=" . $j*5 . "\">$id[$j]</a>";
$j++;
end loop
echo $temp;