|
Posted by Rincewind on 10/07/12 11:28
On 4 Oct 2005 09:22:36 -0700, Steve wrote:
>> I have a page that outputs data about a tv show, all is working fine,
>> however when a query returns for example 14 results I want to be able to
>> output the number that corresponds to the position in the result, alongside
>> the details.
>
> Just before the while loop starts:
> $counter = 0;
>
> Immediately after the while loop starts:
> $counter++;
>
> Wherever you want to display the row number:
> "...<span>$counter</span>..."
>
> ---
> Steve
Thanks Steve that works fine, I had all the right bits, but couldn't for
the life of me work out where to put them.
[Back to original message]
|