-2

How do I add an additional email onto the following:

$shop_email = $site->config->business_email; 

I have already tried a lot of combinations (below), but they don't work:

$shop_email = $site->config->business_email, email@domain.com; 

$shop_email = array("$site->config->business_email","email@domain.com";

Thanks.

Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
tom662
  • 21
  • 3
  • this is unclear; which framework/mailer are you using and how are emails being populated? – Funk Forty Niner Feb 04 '18 at 16:13
  • 1
    It's a bespoke platform, but I just need to amend that line of code so it also sends to a set email I put in manually. Thanks – tom662 Feb 04 '18 at 16:16
  • 1
    If it's a bespoke platform, how are we supposed to know how the `$shop_email` variable is used? – iainn Feb 04 '18 at 16:18
  • ¢shop_email is taken from a database, but i'm not asking to edit the $shop_email, I'm asking to add an email to the existing line of code of: $shop_email = $site->config->business_email; – tom662 Feb 04 '18 at 16:30

1 Answers1

0

There isn't enough information in your question to provide an informed answer. However, assuming that business_email is an array, you can do something like this:

$shop_email = $site->config->business_email;
$shop_email[] = 'email@domain.com';

If business_email is not an array but a string, you can do this instead:

$shop_email = [$site->config->business_email,'email@domain.com'];

HTH..