adrake9
asked on
Using PHP look through a directory of files and filter by 3-digit number
I need to be able to sort through a list of files that have a naming scheme like this.
example:
102.101_floorplan.pdf
102.105_floorplan.pdf
103.105_floorplan.pdf
etc.,.......
what is the easiest way to search through this list. Using the first 3-digit number, get the file names and output a link for download on my web page. I would need to filter the results so that if there were 10 floorplans for one property or 2 floorplans for another it wouldn't matter. It would just output what was filtered through. Any help is appreciated greatly.
example:
102.101_floorplan.pdf
102.105_floorplan.pdf
103.105_floorplan.pdf
etc.,.......
what is the easiest way to search through this list. Using the first 3-digit number, get the file names and output a link for download on my web page. I would need to filter the results so that if there were 10 floorplans for one property or 2 floorplans for another it wouldn't matter. It would just output what was filtered through. Any help is appreciated greatly.
ASKER
The variable that I'm passing from page to page is:
PropNum=101 the url looks like this "infosheet.php?PropNum=101 "
Can this variable be placed into the $searchnumber variable and the script run from that?
-A
PropNum=101 the url looks like this "infosheet.php?PropNum=101
Can this variable be placed into the $searchnumber variable and the script run from that?
-A
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
PERFECT. JUST PERFECT. Thank you. Wish I could grad A++, quick and very helpful!
http://x/pdf/floors.php?id=101
Open in new window