How can I remove the last two characters of a filename in PHP?
http://www.nws.noaa.gov/weather/images/fcicons/tsra50.jpg
# becomes
http://www.nws.noaa.gov/weather/images/fcicons/tsra.jpg
and
http://www.nws.noaa.gov/weather/images/fcicons/hi_shwrs60.jpg
# becomes
http://www.nws.noaa.gov/weather/images/fcicons/hi_shwrs.jpg
The extension will always be 3 characters (4 with the period).
You could use a negative value as start to
substr_replace
if you know that the number always is two digits: