The string is in my first post, but here it is again:
$allowed_files = ".jpeg|.jpg|.gif|.png";
The variable it's checking it against is $img_name, for example $img_name = "myfile.gif";
What's happening when I try this is essentially nothing. I get no errors, but it doesn't function either in that anything can be put against the string and it will pass. For example a .txt file would be allowed when it shouldn't be.
I'm sorry if my first post was too vague.