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

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

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

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

print_r($fruits);