I’ve been caught by this one more times than I’d like to count, so I wanted to post about it. If you copy code (or any text for that matter) from the Web, it often may contain a double quote character. There are actually two double quote characters, ” and ”. See the difference? (No, it’s not that obvious.) The first quote is the one you are probably most used to seeing. It’s ASCII character 34 (decimal), and is the one that is most often used in code. The second is the right quote character, ASCII character 148 (decimal).
So, if you find some code out there that is supposed to solve your problem at hand, you copy and paste it in somewhere, and you start seeing even odder errors, check the quotes!