PHP

PHP Menu

PHP

join() Function - Definition, Syntax, Parameters, Examples

Definition

The join() function returns a string from the elements of an array. This function is an alias of the implode() function.

Syntax

join(separator, array)

Parameters

Parameter Description
separator Optional. Specifies what to put between the array elements. Default is "" (an empty string) .
array Required. The array to join to a string.

Example

<?php
$welcome = array('Welcome', 'to', 'PHP', 'Tutorials!'); echo join(" ",$welcome);

Introduction

PHP Basics

PHP Advance

PHP OOP

PHP Functions and Methods