Quote:
I know it's not perfectly efficient but I posted it like that for 2 reasons:
1) It's exactly the same code as he already has, just moving the lines around.
2) It teaches dealing with associative arrays in the future eg, the email address as $key and the real name as $value.
|
in that case, this is acceptable..
Quote:
I'm afraid I broke a rule I have "Don't post unless you are sure". The syntax I gave for mail() is wrong, this is correct:
$to = "mary@example.com" . ", " ; // note the comma not semi-colon
$to .= "kelly@example.com";
|
if we work on the basis of php manual, yes it's true. however, i prefer to use semicolon to separate the mail address in order to distinguish params and literal string. although zend vm will read $to as string which results in comma (,) interpreted as literal comma and not as param. i discourage this method for the reason of consistency. but hey, i'm not the core dev there, so this is just more like individual taste.
