It is possible to use arrays within strings, just skip ''.
Write
    $name="My $name[name]";
instead
    Hugo

"Matt Williams" <[EMAIL PROTECTED]> skrev i meddelandet
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Tuesday 02 July 2002 13:49, Uwe Birkenhain wrote:
>
> > Hi,
> > I upgraded to 4.2 and now I get those errormessages
> > "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']";
> >
>
> Try
>
> $name = "My {$row['name']}";
>
> or
>
> $name = "My ".$row['name'];
>
> AFAIR you can't use array variables straight within strings.
>
> Maybe I'm just about to be proved wrong :)
>
> matt



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to