note 40666 deleted from tokens by betz
| From: | betz@php.net | Date: | Thu, 11 Mar 2004 10:50:17 +0000 |
| Subject: | note 40666 deleted from tokens by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-66627@lists.php.net to get a copy of this message | ||
Note Submitter: whizkid@NOSPAM.mbstandems.com
----
I've noticed I got this one for a bit - if you're getting unnatural Parse Errors, like
Unexpected T_VARIABLE or T_STRING, or something along those lines, then it's probably an error
involving quotation marks, like in a variable.
Often this would happen when trying to stick HTML inside of a variable, you'd just forget
things, then you'd put, say an anchor tag inside of a variable.
The quotes inside your HTML tag, would automatically close the variable, then you'd get Parse
errors coming out your ears, even if the code was tested and worked perfectly somewhere else. This
happened a lot to me ;)
If you're getting unnatural Parse Errors when you're definately sure your code inside of a
variable, printf statement, or whatever, try using single quotes, or leave quotes altogether out of
your HTML tags.
<img src=images/image.gif alt=Blah> seems to work just fine on most browsers. It's not
exactly good coding practice, but then again, not much is.