PHP

PHP Menu

PHP

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

Definition

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

Syntax

implode(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 implode(" ", $welcome);

Introduction

PHP Basics

PHP Advance

PHP OOP

PHP Functions and Methods