Use a counter when iterating through the results When counter % (modulus) 3=0 then write a new row Mark -----Original Message----- From: Simon Allison [mailto:stg@xxxxxxxxxxxx] Sent: 22 April 2005 15:00 To: php-general@xxxxxxxxxxxxx Subject: Repeat Accross, then down Say for a photo album with photo paths taken from a database (or anything from a database for that matter) how can you use PHP to repeat across for three photos and then add a new row with the next 3 photos and so on and so on? Gamma Global : Suppliers of HPCompaq, IBM, Acer, EPI, APC, Cyclades, D-Link, Cisco, Sun Microsystems, 3Com GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND AN 'ISO 9001 2000' REGISTERED COMPANY ********************************************************************** CONFIDENTIALITY NOTICE: This Email is confidential and may also be privileged. If you are not the intended recipient, please notify the sender IMMEDIATELY; you should not copy the email or use it for any purpose or disclose its contents to any other person. GENERAL STATEMENT: Any statements made, or intentions expressed in this communication may not necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no content herein may be held binding upon Gamma Global (UK) Ltd or any associated company unless confirmed by the issuance of a formal contractual document or Purchase Order, subject to our Terms and Conditions available from http://www.gammaglobal.com E&OE ********************************************************************** ********************************************************************** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php