Table of Contents

implode

WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0

Turn an array into a string

Description

string implode ( array $array, string $delimiter )

Turn an array into a string with the delimiter separating each element

Parameters

$array: Array to be turned into a string

$delimiter: Character to use for separating each array element put into the string

Notes

For float values and indexed float arrays, values are rounded to 3 decimal places.

Return Values

String containing concatenated elements

Example

<?
  $mylist=array("one","two","three","four");
  $st=implode($mylist,"|");
  print($st);
?>

The above example will output:

one|two|three|four 

See Also

explode() - Turn a string into an array

array() - Create an array, with optional values

uPHP Variable Types and Limits

Additional Information

The mainline PHP function implode() can accept its parameters in either order, but uPHP requires that the array comes first followed by the delimiter.

Wattmon uPHP's parameter order is easier to remember and more consistent: The delimiter parameter comes last in both explode() and implode().