Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-19-2003, 08:34 PM   #1
LQ Newbie
Registered: May 2002
Location: NY, USA.
Distribution: RH + Win2k
Posts: 11

Rep: Reputation: 0
Question php - find files (photo*.jpg) and return results to an array

Hi guys,
I'm having some problem creating a
php function that searches a specific path
for for files that match the patern
"photos*.jpg" or "pics_?.gif". If the
files are found I would like the results
to be returned to an array

Old 06-20-2003, 10:28 AM   #2
Registered: Feb 2003
Distribution: debian
Posts: 56

Rep: Reputation: 15
What specific problem are you having?

Have you tried the readdir($directory_path_goes_here) function?
Old 06-20-2003, 11:42 AM   #3
LQ Newbie
Registered: May 2002
Location: NY, USA.
Distribution: RH + Win2k
Posts: 11

Original Poster
Rep: Reputation: 0
Hi Unseen,
I currently working on a realestate website and I need to check if a photo(s)
exists for a property (house, busnisess, etc..). The photo name coresponds to the propety id. for example if the property id
number = 50123, then the filename for that photo would be "50123.jpg". However there are some properties that have more than one photos so for the secon photo the filename would be something like "50123_2.jpg" and the 3rd would be "50123_3.jpg" and so on.

so now, given the directory with the images I have to check if a photo exist for
a selected property and also I need to check if there are more images for that property.

Thaks alot for your help


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi-line return from grep into an array? rose_bud4201 Programming 2 06-14-2005 04:11 PM
How to return values into an array using awk Helene Programming 1 05-01-2004 10:05 PM
function won ' t return character array word Linh Programming 1 07-31-2003 06:11 PM
C can 't return a character array Linh Programming 5 06-18-2003 04:58 AM
Cannot pass and return a character array Linh Programming 1 06-12-2003 04:17 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:52 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration