Strings In Depth14 / 18
Up next

Split into characters

<?php
declare(strict_types=1);
// one character per element
print_r(str_split("hello"));
// or fixed-size chunks
print_r(str_split("abcdef", 2));
What you're solving

str_split makes an array of pieces