I am unable to understand how to use email address of user at another place in same page of code

$message2 = Swift_Message::newInstance()
				  ->setSubject($row3['subject'])
				  ->setTo(array($user['email'] => $user['username']))
				  ->setFrom(array($core->site_email => $core->site_name))
				  ->setBody($newbody2, 'text/html');

Recommended Answers

All 2 Replies

Well this is a class, you should see what functions it has.

Just use: $user['username']

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.