我有一個數組:傳參數有條件地起作用
<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和L-NAME中有值,則郵件將
First name = asdff
Last Name= adsf
實施例2: 如果只有FNAME,L-NAME和地址中有值,則郵件將是
First name = asdff
Last Name= adsf
Address=sdfaf
感謝您的邏輯.. – user1986787