PHP has a built-in
expolde() function by using that we can convert a string into an array.
Here is an example that converts the string
Good morning sun to an array.
$str = "Good morning sun"; print_r (explode(" ", $str));
Array (  => Good  => morning  => sun )