The join() method join array elements with a string
Example.php
<?php use kim\present\utils\arrays\ArrayUtils;
$arrayUtils = ArrayUtils::from(["Apple", "Banana", "Carrot"]);
//Joining array with multiple elements
$arrayUtils->join(); // "Apple,Banana,Carrot"
$arrayUtils->join(" and "); // "Apple and Banana and Carrot"
$arrayUtils->join(" || "); // "Apple || Banana || Carrot"
//Joining with prefix
$arrayUtils->join(" and ", "I like ");
// expected output: "I like Apple and Banana and Carrot"
//Joining with prefix and suffix
$arrayUtils->join(" and ", "I like ", " little bit");
// expected output: "I like Apple and Banana and Carrot little bit"