Great guys have helped me a lot in this other post:
Get last word from URL after a slash in PHP
Now I am facing another issue.
How can I say something like this in PHP:
$last_word you find also
I explain my
$last_word now shows
But I do not need
I only need
How do I say in PHP to
delete -0.html and to grab only
Thanks for your help. Since it is a dynamic script I obviously do not know what is before
"-0.html". The word "test" is only an example. Just to let you know that
"test" is represented by a variable in my code, and it works. Now I only need to tell to the code to eliminate
0.html when is found.
$last_word = str_replace(array('-0.html','-0.htm'), '', $last_word);
Hope this helps. It will replace the string (
-0.htm) even if found somewhere else than at the end of $last_word.