str_split()

It convert a string to an array

Example

<?php
echo “<pre>”;
print_r(str_split(‘phpcode’,2));
?>

Output

Array
(
[0] => ph
[1] => pc
[2] => od
[3] => e
)