php - array to string conversion error in codeginiter in controller -


$data = array('first_name' => $this->input->post('fname'), 'middle_name' => $this->input->post('mname'),  'last_name' => $this->input->post('lname'), 'email_name' => $this->input->post('email'), 'pwd_name' => $this->input->post('pwd'),      'cno_name' => $this->input->post('cno'),     'gender_name' => $this->input->post('gender'),     'country_name' => $this->input->post('country'),     'lang_name' => $this->input->post('lang')  );             echo $data; 

i want echo or print $data, showing error severity: notice

message: array string conversion

method 1

foreach($data $key => $val)     echo($key.' => '.(is_array($val)?implode(',', $val):$val).'<br>'); 

method 2

var_dump($data); 

method 3

print_r($data); 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -