I'm extremely weak when it comes to arrays, so please forgive me. So now I have this piece of code:
$files = glob($abs_url.$img_path.'/cat-par*.jpg');
foreach $file in $files
{
$filename = substr($files, strlen($abs_url.$img_path.'/cat-par*.jpg'), 2,4);
$pieces = array_map('ucfirst', explode('-', $filename));
}
?>
So $files is the variable that contains the, for example, six or eight images in the folder, yes? And then $files is pulled into the foreach statement. There, I want it to read all pieces of the variable contained between the "-" (hyphen) AFTER the first two, "cat" and "par." I know that section is wrong. As for the foreach statement and how values are read into $files: totally lost.
The sad thing is that if I had time, I'd go take a PHP course. I love this language, but am often lost within it.