Re: [PHP] unexpected T_STRING error

2002-09-28 Thread Chris Shiflett
I think you meant to end both of these strings with a ' Philip Olson wrote: > echo 'a \'string\' b"; > echo 'a "string" b"; > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] unexpected T_STRING error

2002-09-28 Thread Philip Olson
You can mix and match single (') and double (") quotes so the following are all appropriate: echo "a 'string' b"; echo "a \"string\" b"; echo 'a \'string\' b"; echo 'a "string" b"; See? PHP can't read your mind and know what " goes with what, like: echo "a"b"c"d"e"f"g"; // BAD

Re: [PHP] unexpected T_STRING error

2002-09-28 Thread Gary
ds \">"; > > >>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 follow

Re: [PHP] unexpected T_STRING error

2002-09-28 Thread Chris Shiflett
Everyone seems to forget that you don't have to do everything in PHP. if ($_POST["keywords"]) { ?>"> Can someone explain to me why I am getting an error for the following? > > $keywords = $_POST[keywords]; > if ($keywords) { >echo""; > } -- PHP

Re: [PHP] unexpected T_STRING error

2002-09-28 Thread Matt
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 Al

RE: [PHP] unexpected T_STRING error

2002-09-28 Thread Jonathan Rosenberg
That line is syntactically invalid. Did you meant it to say echo "<META NAME=$keywords CONTENT= $keywords >"; -- JR > -Original Message- > From: Gary [mailto:[EMAIL PROTECTED]] > Sent: Saturday, September 28, 2002 11:15 AM > To: [EMAIL PROTECTED] > Sub

[PHP] unexpected T_STRING error

2002-09-28 Thread Gary
Hi All, Can someone explain to me why I am getting an error for the following? $keywords = $_POST[keywords]; if ($keywords) { echo""; } TIA Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph