Avatar of willsherwood
willsherwood

asked on 

PHP (Linux) all files beginning with ...

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!
HTMLPHP

Avatar of undefined
Last Comment
willsherwood

8/22/2022 - Mon