我正在使用PEAR邮件系统发送经过身份验证的邮件.我需要发送具有alink的HTML邮件.在我开始使用PEAR邮件之前它工作正常.现在我无法发送HTML邮件.
邮件正文如下:
$body = <<<EOD
Hiya $username
You might be interested in the current 'haves' and 'wants' on example.com
Latest Haves
<a href="http://www.exmaple.com/product/have/64/Titan+Fast+Track+SunGlass">Titan Fast Track SunGlass</a>
EOD;
Run Code Online (Sandbox Code Playgroud)
一个标签出现在邮件中.任何想法如何解决这个问题?请帮忙..
我在foreach声明方面遇到了一些问题foreach.尽管输入语句是一个数组,但它说
Invalid argument supplied for foreach()
Run Code Online (Sandbox Code Playgroud)
我的代码看起来像这样
foreach($res_array as $res)
{
foreach($res as $re)
{
echo $re['shortUrl'];
}
}
Run Code Online (Sandbox Code Playgroud)
我的数组看起来像这样
Array ( [errorCode] => 0 [errorMessage] => [results] => Array ( [http://www.telegraph.co.uk/earth/earthpicturegalleries/5966251/The-weirdest-animals-on-Planet-Earth.html?image=5] => Array ( [hash] => 2qNNV6 [shortUrl] => http://su.pr/2qNNV6 ) ) [statusCode] => OK )
Run Code Online (Sandbox Code Playgroud)
我得到了第二个foreach的错误.请帮我解决这个问题.