PHP Programing language

join() Functions in PHP
Previous Home Next

join()

The join() function returns a string from the elements of an array.

Syntax:
join(separator,array)

In above syntax, "separator" specifies what to put between the array elements. Default is "" (an empty string) and "array" The array to join to a string

Example:

<?php
$arr = array('Gud','Morning..!!','Have','a','nice','Day!');
echo join(" ",$arr);
?>

 

Output:

Gud Morning..!! Have a nice Day!

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: