User Tools

Site Tools


uphp:functions:implode

This is an old revision of the document!


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

Return Value

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 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().

uphp/functions/implode.1489865528.txt.gz · Last modified: 2021/09/13 05:56 (external edit)