xxxxxxxxxx
const array = [1, 2, 3, 4, 5];
const string1 = array.join(); // Convert array to comma-separated string
console.log(string1); // Output: "1,2,3,4,5"
const string2 = array.toString(); // Another way to convert array to comma-separated string
console.log(string2); // Output: "1,2,3,4,5"
const string3 = JSON.stringify(array); // Convert array to JSON string
console.log(string3); // Output: "[1,2,3,4,5]"
xxxxxxxxxx
print_r($request->education); //It is an array print
$str_json = json_encode($request->education); //array to json string conversion
echo $str_json; // printing json string
print_r(json_decode($str_json)); //printing array after convert json string to array
exit; // exiting further execution to check resutls
xxxxxxxxxx
char[] charArray = new char[] {'b','u','z','z'};
Stream<String> stream = Arrays.stream(charArray);
String store=stream.collect(Collectors.joining(" "));
System.out.println(store);