How can I include an string in an array?
emailconfig.php
$globalemail 'info@site.com'=>'site'";
I want to make a new array like this:
sendemail.php
include "emailconfig.php"
$fulllist=array('info@forum.com'=>'forum', '$globalemail');
// the Array MUST must appear above, ideally it would look like this
// $fulllist=array('info@forum.com'=>'forum', 'info@site.com'=>'site');
It brings PHP error because of the =>
One way is: in your
emailconfig.php, you should have 2 variables,$globalemailkeyand$globalemailvalue.Or, store an array in
emailconfig.php, and usearray_merge.