What PHP function can be used to split a string based on a delimiter like a comma?

To split a string based on a delimiter like a comma in PHP, you can use the `explode()` function. This function takes two parameters: the delimiter (in this case, a comma) and the string to be split. It returns an array of substrings that were separated by the delimiter.

$string = "apple,banana,orange";
$delimiter = ",";
$split_array = explode($delimiter, $string);

print_r($split_array);