Richfield T Flores Richfield T Flores - 6 months ago 11
PHP Question

A PHP Error was encountered array conversion

Can you help how to solve this im new in Php codeigniter. this code that get error

A PHP Error was encountered

Severity: Notice

Message: Array to string conversion

Filename: controllers/employers.php

Line Number: 44

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/tedyaya/public_html/system/core/Exceptions.php:186)

Filename: helpers/url_helper.php

Line Number: 543

Answer

This error telling you that you are trying an array to convert in string..

For example

<?php
$a = array("Apple","Bnana");
echo $a;//Will give you same error 
?>

But

<?php
$a = array("Apple","Bnana");
print_r($a);//Will not give you any error
?>