implode()
or join()
functionYou can use the PHP implode()
or join()
function for creating a string by joining the values or elements of an array with a glue string like comma (,
) or hyphen (-
).
Let's take a look at the following example to understand how it basically works:
<?php
$array = array("red", "green", "blue");
// Turning array into a string
$str = implode(", ", $array);
echo $str; // Outputs: red, green, blue
?>
i hope you like this small tutorial.
Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]
How to check request is ajax or not in Laravel
In this tutorials we will share with you...How to Use wget Command With Examples
Wget is free and cross-platform command-...How to fix Target class does not exist in Laravel 8
Laravel 8 has many new features and chan...How to disabled Submit Button after Clicked using jQuery
Often times, users like to press a few t...How to get selected file name from input type file using jQuery
Use the jQuery change() method You ca...