Home » PHP join() function

PHP join() function

by Online Tutorials Library

PHP string join() Function

PHP string join() is predefined function. It is used to return a string from the elements of an array. It is an alias of the implode() function.

Syntax:

Parameter Description Required/Optional
separator Specify the array element optional
array The array to join to a string required

Example 1

Output:

Hello PHP Join Function  

Example 2

Output:

Hello+PHP+Join+Function  

Example 3

Output:

Hello-PHP-Join-Function  

Example 4

Output:

1  2  3  4  5  6  7  8  9  10  

Next TopicPHP String

You may also like