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.


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"&lt;META NAME="keywords" CONTENT=" $keywords "&gt;";
> 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"&lt;META NAME=\"keywords\" CONTENT=\" $keywords \"&gt;";

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

Reply via email to