troubleshooting Question

PHP (Linux) all files beginning with ...

Avatar of willsherwood
willsherwood asked on
HTMLPHP
6 Comments2 Solutions295 ViewsLast Modified:
I need to generate a loop to display all images that begin with a given base filename (which will have suffixes of various syntaxes, but the base that i give will be unique for this image grouping purpose).  The (foreach?) loop would iterate four times in the below case.
Please help me with the PHP wildcard directory search and ensuing loop to process the files

example directory contents:
100.jpg
100a.jpg
100b.jpg
100c.jpg

$directory_results_from_wildcard_search =
               directory_lookup_wildcard ($path_with_base_filename+"*"+".jpg");

//explode???  line by line???

foreach ($directory_results_from_wildcard_search)
{
 i can display image at a time here, i'm okay with this part
}

Open in new window


thanks!
ASKER CERTIFIED SOLUTION
szewkam

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros