What function in PHP can be used to split a string into an array based on a specific delimiter?
To split a string into an array based on a specific delimiter in PHP, you can use the `explode()` function. This function takes two parameters: the delimiter (a string that specifies where to split the input string) and the input string that you want to split. It will return an array of substrings created by splitting the input string based on the delimiter.
// Input string
$string = "apple,banana,cherry";
// Split the string into an array based on the delimiter ','
$array = explode(",", $string);
// Output the resulting array
print_r($array);