array to string conversion php even though i pass string code example
Example 1: Notice: Array to string conversion php
// Use json_encode to collapse the array to json string:
$stuff = array(1,2,3);
print json_encode($stuff); //Prints [1,2,3]
Example 2: Notice: Array to string conversion php
// suppress the Notices:
error_reporting(0);
print(array(1,2,3)); //Prints 'Array' without a Notice.