Re: $name = "My $row['name']" not longer possible?
| From: | Uwe Birkenhain | Date: | Tue, 02 Jul 2002 18:54:32 +0000 |
| Subject: | Re: $name = "My $row['name']" not longer possible? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-104995@lists.php.net to get a copy of this message | ||
Hallo Matt,
thank you for the explanation and for the manual-link!
But - correct if I'm wrong - that has been possible before! Or not?
Uwe
Matt Schroebel schrieb in Nachricht
<4B08FD7DB3CBD4119F560002A508C453015B3851@hsus3>...
>> "Parse error: parse error, unexpected
>> T_ENCAPSED_AND_WHITESPACE, expecting
>> T_STRING or T_VARIABLE or T_NUM_STRING in ..."
>>
>> when doing sth like:
>> $name = "My $row['name']";
>
>You have to wrap array references in curly braces within double quoted
strings. Proper form is:
>$name = "My {$row['name']}";
>
>See:
http://www.php.net/manual/en/language.types.string.php#language.types.string
.parsing.complex