php - How to add variable in error message which messages are came form database -


simply want add variable messages after operation.

i have created messge_library proper error message. every time after transaction success/fail fetch message accrding it.

so want add variable in messages better understating of message user. fetching messages form database. , sending view. have added variable in message problem set value of variables. in controller? or in view?

here controller function overview.

public function function_name() {     //code related process       //here message regarding process     //from here redirect flash message     // flash message want add variable inside message.      $msg = $this->messge_library->get_message($this->class, $this->key );      $this->load->view ( 'employer/post_job', ['msg'=>$msg]);             } 

this array of message:

array (     [message_text] => message $variable1 text according success or fail $variable2     [alert_class] => according success or fail error or success ) 

so, if want add variable inside error message should do?

converting array list or json solution


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -