I have code like this
$word = \'foo\'; $char_buff = str_split($word); foreach ($char_buff as $chars){ echo var_dump($chars); }
The out
str_split() converts a string to an array. There's no need to use this function if you want to keep the whole word.