Core Function JoinKV
From Sputnik Wiki
(Difference between revisions)
UberFoX (Talk | contribs)
(Created page with "<pre> JoinKV( <array>, <separator> ) </pre> === Description === Join an array (as keys and values) into a string with an optional separator. === Parameters === ==== array ===...")
Newer edit →
(Created page with "<pre> JoinKV( <array>, <separator> ) </pre> === Description === Join an array (as keys and values) into a string with an optional separator. === Parameters === ==== array ===...")
Newer edit →
Revision as of 06:15, 30 August 2013
JoinKV( <array>, <separator> )
Contents |
Description
Join an array (as keys and values) into a string with an optional separator.
Parameters
array
The array to join.
separator
Optional; A string to place between each array element.
Default is "\n" a newline.
Return Value
Success - The array merged into a string.
Failure - Returns an empty string.
Remarks
This does not alter the original array.
Example
$arr = array("foo" => 1, "bar" => 2, "testingFooBar" => 3); $joined = JoinDict($arr); PrintfC($joined); # 'foo 1 # bar 2 # testingFooBar 3'