David Tulloh wrote:
> Ross wrote:
>> How can I get this line to work
>>
>> $mail_body .= "<font size=\"2\" face=\"Verdana, Arial, Helvetica, 
>> sans-serif\"> Title: $row['title'] </font>";
>>
>> The $row['title'] variable is the problem.
> 
> Drop the quotes when you are inside a quoted string.
> $mail_body .= "... Title: $row[title] </font>";

does that actually work? not that I care - I still consider it wrong.
there are 2 proper ways to do it:

1. interpolation with curly braces:

        $x = "...Title: {$row['title']} bla bla";

2. break out of the string:

        $x = "...Title: ".$row['title']." bla bla";

as to the religious war over which of the 2 is 'better', grab a gun and
pick a side.

> 

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

Reply via email to