This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
uphp:functions:implode [2017/02/28 13:36] jeff |
uphp:functions:implode [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
======implode====== | ======implode====== | ||
+ | |||
< | < | ||
- | Turn an array into a string | + | < |
====Description==== | ====Description==== | ||
- | <well size=" | + | |
- | <span style=" | + | <well size=" |
- | < | + | <span style=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
+ | <span style=" | ||
</ | </ | ||
- | Turn an array into a string with the delimiter separating each element | + | |
+ | < | ||
====Parameters==== | ====Parameters==== | ||
- | < | ||
- | < | + | <html><b>< |
- | ====Return | + | < |
- | String containing concatenated elements | + | |
+ | ====Notes==== | ||
+ | |||
+ | For float values and indexed float arrays, values are rounded to 3 decimal places. | ||
+ | |||
+ | ====Return | ||
+ | |||
+ | < | ||
====Example==== | ====Example==== | ||
- | <code php><? | + | |
- | $mylist=array(" | + | <code php> |
- | $st=implode($mylist," | + | <? |
- | print($st); | + | $mylist=array(" |
- | /* result is: | + | $st=implode($mylist," |
- | one|two|three|four | + | print($st); |
- | */ | + | ?> |
- | ?></ | + | </code> |
+ | |||
+ | The above example will output: | ||
+ | < | ||
+ | one|two|three|four | ||
+ | </ | ||
====See Also==== | ====See Also==== | ||
- | [[explode()]] - Turn a string into an array | ||
- | [[array()]] - Create an array with values | + | [[explode()]] - < |
+ | |||
+ | [[array()]] - < | ||
[[uphp: | [[uphp: | ||
====Additional Information==== | ====Additional Information==== | ||
- | The mainline PHP function '' | + | |
+ | The mainline PHP function '' | ||
Wattmon uPHP's parameter order is easier to remember and more consistent: | Wattmon uPHP's parameter order is easier to remember and more consistent: | ||