Well... now I am even more confused.

Check the VarTypeName($ext) and if it is integer and you want it to be a string, cast it as per my example. You should not put vars in quotes like you do. Also, @CRLF is easier than CHR().
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.