PHP send email foreach - send to

前端 未结 2 1537
慢半拍i
慢半拍i 2021-01-29 09:52

I\'m using a script to send email to checked users (approval), but script is sending only to first checked user, here\'s the script:

if (isset($_POST[\'approve\'         


        
2条回答
  •  失恋的感觉
    2021-01-29 10:14

    Move the sendEmail() function outside the foreach loop. Since it is inside the loop so you got the error Cannot redeclare sendEmail()

提交回复
热议问题