This shows you the differences between two versions of the page.
uphp:functions:explode [2017/04/06 11:54] jeff |
uphp:functions:explode [2021/09/13 05:57] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======explode====== | ||
- | |||
- | < | ||
- | |||
- | Turn a < | ||
- | |||
- | ====Description==== | ||
- | |||
- | <well size=" | ||
- | < | ||
- | <span style=" | ||
- | <span style=" | ||
- | </ | ||
- | [[explode]] ( | ||
- | < | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | </ | ||
- | </ | ||
- | Turn a < | ||
- | |||
- | ====Parameters==== | ||
- | |||
- | < | ||
- | |||
- | < | ||
- | |||
- | ====Return Value==== | ||
- | |||
- | < | ||
- | |||
- | ====Example==== | ||
- | |||
- | <code php> | ||
- | < | ||
- | $mylist=" | ||
- | $myarray=explode($mylist,"," | ||
- | print_r($myarray); | ||
- | ?></ | ||
- | </ | ||
- | |||
- | The above example will output: | ||
- | < | ||
- | [$myarray] = Array ( | ||
- | (string) [0] => one | ||
- | (string) [1] => two | ||
- | (string) [2] => three | ||
- | (string) [3] => four | ||
- | ) | ||
- | </ | ||
- | |||
- | ====See Also==== | ||
- | |||
- | [[implode()]] - Turn an < | ||
- | |||
- | [[print_r()]] - Dump the contents of an < | ||
- | |||
- | [[sizeof()]] - Return the number of elements in an < | ||
- | |||
- | [[uphp: | ||
- | |||
- | ====Additional Information==== | ||
- | |||
- | Note that there is an important difference in the parameter order between mainline PHP and Wattmon uPHP. In the mainline PHP function the delimiter comes first, but in uPHP the < | ||
- | |||
- | < | ||
- | |||
- | < | ||
- | |||
- | Wattmon uPHP's parameter order is easier to remember and more consistent: | ||