What function in PHP can be used to split a string into multiple parts based on a specified delimiter?

To split a string into multiple parts based on a specified delimiter in PHP, you can use the `explode()` function. This function takes two parameters: the delimiter to split the string on and the string to be split. It returns an array of substrings. You can then access each part of the split string using array indexing.

$string = "apple,banana,cherry";
$delimiter = ",";
$parts = explode($delimiter, $string);

foreach ($parts as $part) {
    echo $part . "\n";
}