I can convert a string 'html php js'
to array using explode
, such as
$string = 'html php js';
$output_array = explode(' ', $string);
and it works fine. But how to convert a string that has no spaces?
$string = 'html';
// *** outputs as ['h','t','m','l']
and that the output has to be an array of strings.