Page 1 of 1

Parse Error --Help Please

Posted: Thu Apr 13, 2006 12:02 pm
by skm376
Pimptastic | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I am trying to format the body of a plain text email I want my script to send.  I might be doing this completely wrong.  I get this error when I try and run the script:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING

Here is the code:

Code: Select all

$body = 'Peel, Inc.' "\n"
'Weekly ShopDani Inventory Updates' "\n"
date('jS F Y') "\n"
"\t" .$jewelryName. "\t" .$oldAmt. "\t" .$newAmt. "\n";
Am I going about this completely wrong? How can I fix this bug...Thanks


Pimptastic | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Thu Apr 13, 2006 12:03 pm
by timvw
If you want to concatenate strings, you have to use .

'foo' . 'bar' . "barfoo";