if you decide to display only first 4 item try to used limit clause after 
the SQL statement.  otherwise use any count variable within your loop.

Sommai

At 20:33 26/2/2002 -0600, Paul DuBois wrote:
>At 18:42 -0600 2/26/02, Craig Westerman wrote:
>>The following lists 12 items from a fruits table.
>>
>>$results = mysql_query("SELECT ID, date, appleprice, orangeprice, pearprice
>>FROM fruits");
>>while ($data = mysql_fetch_array($results))
>>{
>>?>
>><p><?=$data["date"]?> - <?=$data["appleprice"]?> -
>><?=$data["orangeprice"]?> - <?=$data["pearprice"]?></p>
>><?
>>}
>>
>>How would I modify the loop to display 4 items then a row of fruit images
>>then 4 more items then another row of different fruit images and then
>>finally finish the loop displaying the final 4 items?
>
>That's a good question, given that the query doesn't retrieve any images,
>nor is it evident where else they might come from. :-)
>
>But it sounds like you're talking about three loops, not one.
>
>>
>>Thanks
>>
>>Craig ><>
>>[EMAIL PROTECTED]
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

----------------------------------------------------------
Please be informed that all e-mail which are addressing to
thaithanakit.co.th will need to be changed to
BTsecurities.com by March 1, 2002 Thank you. :-)
----------------------------------------------------------

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to