My code:
<?php
$string = "hello world";
echo $string[1]; //output is 'e'
echo end($string); // I've got a warning error
?>
How can I exchange my string variable to an array format?
I think if I exchange it the problem will solve.
There is a predefined function that do this. It’s str_split(). Here http://it.php.net/manual/en/function.str-split.php you find the doc