如何在php codeigniter 3中将表单数据添加到动态字符串中

PHP -> CODEIGNITER

Tables - users [customers information] - sms gateway [sms gateway configuration apiKey, sender code] - sms template [ pre-approved dynamic templates eg, visitor to office]

Form - fullname [input field] = SHREYAS - Phone [input field] = 123456789 - service [dynamic dropdowm from services table] = ABC - remark = QWERTY

** Form Submitted ** 1) $post = $this->input->post(); [PHP codeigniter syntax for controller]

2) $data[] = $post[]; [all the form data is stored in array called data]

3) inserted data to db [visitors]

** sending sms to visitor ** 1) $users_id = $this->session->userdata('users_id'); [PHP codeigniter syntax for getting users_id from session]

2) get_sms_gateway_details [of customer where users_id = $users_id]

3) $sms_content[users_id,sms_gateway_id,TITLE] // getting the template with users_id sms_gateway_id and title("visitors")

4) $sms_content is added in foreach loop to get visitors template message as string in $message

******** Problem I am facing ********

5) $message = Dear '.$post['fullname'],', Your request for '.$service_name.' is in progress. Our team will get back to you soon. Have a Great Day !!!. mob: +91

0000000000. ("this is the sms template used for visitors in which $post['fullname'] should be SHREYAS and $service_name = ABC" which was submitted in form above)

6) Final output required = Dear SHREYAS, Your request for ABC is in progress. Our team will get back to you soon. Have a Great Day !!!. mob: +91 0000000000.

7) later this will be added to sms_data_array[] and will be sent using PHP CRUL method