This is an old revision of the document!
WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0
Turn a string into an array
value: String to be separated into elements in the array
delimiter: Character to use for separation
Array of elements
<? $mylist="one,two,three,four"; $myarray=explode($mylist,","); print_r($myarray); /* result is: p0 = ARRAY STRING 0 => one STRING 1 => two STRING 2 => three STRING 3 => four */ ?>
implode() - Turn an array into a string
print_r() - Dump the contents of an array to the current output
sizeof() - Return the number of elements in an array
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 string to be exploded comes first:
PHP explode(delimiter,string)
uPHP explode(string,delimiter)
Wattmon uPHP's parameter order is easier to remember and more consistent: The delimiter parameter comes last in both explode() and implode().