I am trying to send the bulk sms I had uploaded the number list in database and fetch that here. This code is working fine for different numbers with same sms body.
$recipients = array();
foreach($phone_nos as $phone_no) {
array_push($recipients, $phone_no['phone_no']);
}
$binding = array();
foreach ($recipients as $recipient) {
$binding[] = '{"binding_type":"sms", "address":"'.$recipient.'"}';
}
$notification = $twilio->notify->v1->services($serviceSid)
->notifications->create([
"toBinding" => $binding,
"body" => Hi First Name, How are you welcome to panel,
// I want to make this dynamic, Every time first name will change
"sms" => [
"status_callback" => AURL .'GroupSms/bulk_sms_status_callback'
],
]);
Now, I want the body of each sms dynamic. Like "Hi (First Name) welcome on the panel". Each phone number will have his First Name. How I can achieve it. Neither I found the solution on search engine nor on documentation.