0
我有一個小問題,我使用PHP表單來獲取我創建的聯繫表單的答案。Implode函數PHP
這裏是PHP:
$email_message .= "E-Commerce: \n";
$email_message .= (isset($_POST['no-credit'])) ?
"No credit card: $".implode(" ", $_POST['no-credit'])."\n" : '';
$email_message .= (isset($_POST['paypal'])) ?
"Paypal: $".implode(" ", $_POST['paypal'])."\n" : '';
當我得到的電子郵件,而「貝寶」或「沒有信用」未選中「電子商務:」仍然顯示。我想是這樣的:
$email_message .= (isset($_POST['no-credit'])) ? (isset($_POST['paypal'])) ?
"E-Commerce: \n";
$email_message .= (isset($_POST['no-credit'])) ?
"No credit card: $".implode(" ", $_POST['no-credit'])."\n" : '';
$email_message .= (isset($_POST['paypal'])) ?
"Paypal: $".implode(" ", $_POST['paypal'])."\n" : '';
但它沒有工作,我摔倒了我不是很遠,但我不能讓我的手就可以了。
感謝
@ShankarDamodaran - 同意。習慣性的問題:) – Rikesh
刪除了我的評論:) ** + 1 ** –
@ShankarDamodaran電子商務行呢?我沒有感到抱歉 –