Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2006
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts

    display an array of images using php

    hi,

    how to display an array of images using php.iam storing the images in array as follows.but how can i print these images.
    $arr1=array('back_test.jpg','horses.jpg');
    thanks
    mrjameer

  • #2
    New Coder
    Join Date
    Mar 2007
    Location
    Northern Ireland
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try this:

    PHP Code:
    foreach($arr1 as $key=>$value){
           echo 
    "<img src='".$value."' alt='".$value."'>";



  •  

    Posting Permissions

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