I knew I shouldn't of been doing this on Saturday morning. I forgot
something as simple as that. Maybe another jolt of caffeine is needed.
Thanks
Gary
Matt wrote:
> The quotes within the quotes.
> Change to:
> echo"<META NAME=\"keywords\" CONTENT=\" $keywords \">";
>
>
>>From: "Gary" <[EMAIL PROTECTED]>
>>Sent: Saturday, September 28, 2002 11:15 AM
>>Subject: [PHP] unexpected T_STRING error
>
>
>
>>Hi All,
>>Can someone explain to me why I am getting an error for the following?
>>
>>$keywords = $_POST[keywords];
>>if ($keywords) {
>> echo"<META NAME="keywords" CONTENT=" $keywords ">";
>>}
>
>
>
> The quotes within the quotes -- you need to escape them. Otherwise, the
> second double quote terminates the quoted string, yet there's some more junk
> on the line. By escaping them, you tellphp you mean the literal ", and
> don't want to terminate the string .
> So change to:
> echo"<META NAME=\"keywords\" CONTENT=\" $keywords \">";
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php