我有一个数组:
<pre>Array
(
[fname] => adsff
[lname] => adsf
[address] => sdfaf
[city] => sdaf
[state] => dsfaf
[zip] => adf
[phone] => asdf
[fax] => adsf
[email] => asdff
[salary] => asdaf
[pemp] => asdfaf
[noofyears] => asdfaf
[married] => asdfaf
[children] => asdfaf
[refname1] => asdfaf
[refphone1] => adsfaf
[refname2] => asdfaf
[refphone2] => sdfaf
[refname3] => dfsg
[refphone3] => sdf
[bank] => sdf
)
我想将此数组传递到邮件中,这样如果任何字段为空白,则它不会在邮件中使用例如:如果只有 fname 和 lname 有值,那么邮件将是
First name = asdff
Last Name= adsf
示例 2:如果只有 fname,lname 和 address 有值,那么邮件将是
First name = asdff
Last Name= adsf
Address=sdfaf