AutoIt implode like PHP implode(); _ArrayToString()

Func implode($glue, $pieces)
    Return _ArrayToString($pieces, $glue)
EndFunc   ;==>implode
#include <String.au3>
#include <Array.au3>
 
$array = _StringExplode("foo|bar|baz", "|");
For $i = 0 To UBound($array) - 1
    ConsoleWrite("array[" & $i & "] = " & $array[$i] & @CRLF)
Next
; array[0] = foo
; array[1] = bar
; array[2] = baz
 
ConsoleWrite(implode(",", $array) & @CRLF)
; foo,bar,baz
Did this help you? Please let me know with a comment. Thank you
Posted .

1 comment (RSS)

  1. anonymous

    you only changed the parameters :D

Leave a comment