I have a simple question that can be solved in seconds probably
I've created a function to create a connection and send an email (text/html/mime depending on it's parameters).
The function has a number of parameters, two of them being $to and $from, like so: function send_email($to,$from,......)
The $to and $from variables can either be a string (email address) or an array with two fields, email and name.
Then, in the function, I did the following:
.... connection stuff etc....
$recipient = (is_array($to)) ? new Swift_Address($to['email'],$to['name']) : $to;
$sender = (is_array($from)) ? new Swift_Address($from['email'],$from['name']) : $from;
$mail_sent = $mailer->send($message,$recipient,$sender);
I'm using PHP4 and everything works perfectly. My question however is: should I use "$recipient = new Swift_Address()" or "$recipient =& new Swift_Address()" ? Both work fine, but I'm wondering which one I should use. Is it =& for PHP4 and = for PHP5?
PS, I'm aware I should switch to an if/else structure if I have to use the =&.
Thanks a lot in advance!