If I have abcxyz.doc
for example and want to return the extension minus the dot, so just doc
as a substring. I cannot rely on the extension always being 3 chars.
<?php
$x = 'abcxyz.doc';
ltrim(strrchr($x, '.'), '.');
Is this the best I can do, or is there a more elegant way to do this?