how to output image thumbs in rows of 3?-VBForums
Results 1 to 3 of 3

Thread: how to output image thumbs in rows of 3?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005

    how to output image thumbs in rows of 3?

    hi all i am trying to display image thumb with its title in rows of 3 but the following code out puts each image in one row! could you guys help me output the image thumb and its title in rows of 3 ?

    // iterate the new array
      for($i = 0; $i < count($foo2[1]); $i++){
    <a href="<?PHP  echo $foo2[1][$i]; ?> "><img src="<?PHP  echo $foo5[1][$i] ; ?>"></a>
    <div class="title"><?PHP  echo $foo3[1][$i]; echo '('. $foo4[1][$i]. ')'; ?></div>
    }//end of for loop

  2. #2
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Trivandrum, Kerala, India

    Re: how to output image thumbs in rows of 3?

    Your issue is not clear to me. Please provide a visual example and also CSS if possible.

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  3. #3
    New Member
    Join Date
    Dec 2012

    Re: how to output image thumbs in rows of 3?

    hai...I didn't understand.....can you explain more...
    you only want to display image thumb in third row?

    like this
    PHP Code:
    // iterate the new array
      for($i = 0; $i < count($foo2[1]); $i++){

    if($i==2){ // because number is start from 0...0,1,2...this only display image in third row.....
    <a href="<?PHP  echo $foo2[1][$i]; ?> "><img src="<?PHP  echo $foo5[1][$i] ; ?>"></a>
    <div class="title"><?PHP  echo $foo3[1][$i]; echo '('$foo4[1][$i]. ')'?></div>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width