I am trying to learn about php string functions, but I'm stuck.
I have this Hello World function:
<?php
$str = "Hello World!";
echo count_chars($str , 0);
?>
But the code gives following output:
Notice: Array to string conversion in /opt/lampp/htdocs/Projects/phpstringfunction/count_chars.php on line 41
Array
I cannot figure out what to do, and it is working fine in the w3schools tutorial.