Joining the array elements into a single string

by Sanju 2010-09-17 12:37:45

Joining the array elements into a single string

The function 'join' is used to join various array elements into a single string. Alternatively 'implode' can also be used to join array elements into a string.

Syntax:


join(separator,arrayname);

(or)

implode(separator,arrayname);


Example:

$arraystring=array("e","raj","shun");

implode("/",$arraystring);

Output :

e/raj/shun

Tagged in:

852
like
0
dislike
0
mail
flag

You must LOGIN to add comments