我想在电子邮件中添加附件.我正在使用sfmailer类.
我在下面给出了我的代码:
$mail_body = '<p>custom html mail content</p>';
$message = Swift_Message::newInstance('Message title')
->setFrom(array('sender'))
->setTo(array('receiver'))
->setBody($mail_body, 'text/html', 'utf-8');
try {
$this->getMailer()->send($message);
}
catch(Exception $e) {
}
Run Code Online (Sandbox Code Playgroud) 我是编程新手.我已经给出了我的问题的描述,我有一对两个文本框.一个文本框用于url,另一个用于指令,但所有文本框都是根据数据库的值动态创建的.
例如$ testing_type_id = 2所以我得到两对文本框,让它称为bundle.$ i用于唯一地识别文本框.
<input type = "text" size="33" class="uploadtxt1 url" name="txturl_<?php echo $testing_type_id ; ?>" id = "txturl_<?php echo $testing_type_id; ?>_<?php echo $i ; ?>" value="" />
<input type = "text" class="uploadtxt2" size="33" name="txtinstruction_<?php echo $testing_type_id ; ?>" id = "txtinstruction_<?php echo $testing_type_id; ?>_<?php echo $i ; ?>" value="" /> <br/>
<input type="submit" name="checkout" id="checkout" class="graybtn1 ptr button_float_left_checkout" disabled="disabled" value="Proceed To Checkout" />
Run Code Online (Sandbox Code Playgroud)
这里我想做的就是如果所有bundle都有价值,无论是在一个文本框还是两个文本框中都这样启用提交按钮.如果我删除了值,那么使用jquery禁用提交按钮.
急需帮助.谢谢.
可能重复:
一个数组的php值到另一个数组的键
我在这里给了两个阵列.
Array-1
(
[0] => 6
[1] => 11
[2] => 13
)
Array-2
(
[0] => 13.339066309
[1] => 0
[2] => 100
)
Run Code Online (Sandbox Code Playgroud)
我想将一个数组的值替换为另一个数组的键.这样的事情:
Array
(
[6] => 13.339066309
[11] => 0
[13] => 100
)
Run Code Online (Sandbox Code Playgroud) 我有两个阵列如下
Array
(
[0] => 2013-07-09
[1] => 2013-07-16
[2] => 2013-07-23
[3] => 2013-07-30
)
Array
(
[0] => 2013-07-16
[1] => 2013-07-23
[2] => 2013-07-30
[3] => 2013-08-06
)
Run Code Online (Sandbox Code Playgroud)
我想通过下面的特殊character.given输出连接两个数组元素值:
Array
(
[0] => 2013-07-09 : 2013-07-16
[1] => 2013-07-16 : 2013-07-23
[2] => 2013-07-23 : 2013-08-30
[3] => 2013-08-30 : 2013-08-06
)
Run Code Online (Sandbox Code Playgroud) php ×4
arrays ×2
.htaccess ×1
email ×1
javascript ×1
jquery ×1
jquery-ui ×1
swiftmailer ×1
symfony-1.4 ×1
symfony1 ×1