Sometimes you just need to get the file extension from a string. Here are a couple quick solutions to get it in literally 1 line of code.
echo pathinfo('puppies.html', PATHINFO_EXTENSION); // Outputs: "html"
echo substr(strrchr('puppies.html', '.'), 1); // Outputs: "html"