How can I use the explode function to split a string into an array in PHP? Example code: - Biz Tech

How can I use the explode function to split a string into an array in PHP? Example code:

Listen
$string = "apple,banana,orange";

$fruits = explode(",", $string);

print_r($fruits);