How do you convert a string to an array in PHP with example?

Hello Friends Today, through this tutorial, I will tell you How do you convert a string to an array using PHP With Example? In PHP, you can convert a string to an array using the `str_split()` function. This function splits a string into an array of characters. Here’s an example:

<?php
$string = "Hello";
$array = str_split($string);
print_r($array);
?>

Output:

Array
(
[0] => H
[1] => e
[2] => l
[3] => l
[4] => o
)

In this example, the string “Hello” is converted into an array where each character becomes an element in the array. The output shows each character of the string as an element in the resulting array.