Hello,
My knowledge of PHP is very limited, and after reading way too many articles on Parse_URL, I'm probably hopelessly lost. So was hoping someone could point me in the right direction.
On my site, certain pages (all located in the same directory) all have a file extension name that goes something like this :
mydomain.com/directory/bs-3.php
mydomain.com/directory/bs-4.php
mydomain.com/directory/bs-5.php
etc....
The only thing in the file name that will change is the number after the "-" and before the .php. The number in the file name will range from 1 up to 99.
What I am trying to do is to (1) parse the url and grab the number portion of the filename, and (2) Use that number as a variable for other PHP functions on the page. In particular, the number will be assigned to a $thisPage variable. I then use $thisPage for previous/next page navigation through my photo galleries.
I currently assign the number for $thisPage manually, which is kind of a drag. Since this is the 21st century and because the $thisPage variable will always match the number used in the file name, I figured there was bound to be a way to use PHP to do this task!
Thanks for any help.
Jim