Jump to content

Archived

This topic is now archived and is closed to further replies.

mbvo

file listing

Recommended Posts

I want a list of all the jpg and gif images in a particular directory, how do i do it?

Share this post


Link to post
Share on other sites
[quote author=mbvo link=topic=110520.msg446868#msg446868 date=1159992721]
I want a list of all the jpg and gif images in a particular directory, how do i do it?
[/quote]

[code=php:0]<?php
  $pictures = glob($myDir.'*.{jpg,gif}', GLOB_BRACE);
  print_r($pictures);
?>[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.