note 40666 added to tokens
| From: | whizkid at NOSPAM dot mbstandems dot com | Date: | Thu, 11 Mar 2004 00:51:49 +0000 |
| Subject: | note 40666 added to tokens | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-66595@lists.php.net to get a copy of this message | ||
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.
----
Manual Page -- http://www.php.net/manual/en/tokens.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40666
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40666&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40666&report=yes
Search -- http://master.php.net/manage/user-notes.php