limiting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

is there any other way to limit this code to only displaying 1 image other 
than using return. When I use return, I can't get the other images to display 
in lightbox, but when I use echo, all 5 of the images will correctly display 
in lightbox, but they are also displaying on the page.

$result = mysql_query("SELECT * FROM properties");
      $row = mysql_fetch_array($result); 
      $matches = glob('images/property_pics/212006966/' .$prefix. '*');
      foreach($matches as $match){
      echo "<a href=$match  rel='lightbox[$matches]' /><img src = 
$match></a>";

I'm not even sure if this is possible, but thought I'd ask before I scrapped 
the idea. I've been at this code since last thursday trying to learn as much 
as I can about it and I just keep going in circles and I'm starting to feel 
like glob() is what is limiting me. I've tried various code blocks with things 
like where(), str_repeat, basename, scandir, sort etc with no luck. :-/

-- 
David M.


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux