Query: implode
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
IMPLODE(3) 1 IMPLODE(3) implode - Join array elements with a stringSYNOPSISstring implode (string $glue, array $pieces)DESCRIPTIONstring implode (array $pieces) Join array elements with a $glue string. Note implode(3) can, for historical reasons, accept its parameters in either order. For consistency with explode(3), however, it may be less confusing to use the documented order of arguments.PARAMETERSo $glue - Defaults to an empty string. o $pieces - The array of strings to implode.RETURN VALUESReturns a string containing a string representation of all the array elements in the same order, with the glue string between each ele- ment.EXAMPLESExample #1 implode(3) example <?php $array = array('lastname', 'email', 'phone'); $comma_separated = implode(",", $array); echo $comma_separated; // lastname,email,phone // Empty string when using an empty array: var_dump(implode('hello', array())); // string(0) "" ?>NOTESNote This function is binary-safe.SEE ALSOexplode(3), preg_split(3), http_build_query(3). PHP Documentation Group IMPLODE(3)
Related Man Pages |
---|
str_split(3) - php |
substr_replace(3) - php |
explode(3) - php |
iterator_to_array(3) - php |
spliti(3) - php |
Similar Topics in the Unix Linux Community |
---|
To return the elements of array |
Nexenta 2.0 Alpha 1 (Development branch) |
PERL : Sort substring occurrences in array of strings |
string comparing in C |
RVM... |