Joins an array, similar to array->join, but with additional options.
Parameters
-array
array, required
An array of elements.
-join
string, optional
String between each element, default is empty string.
-front
string, optional
String to prepend to joined string, default is empty string.
-back
string, optional
String to append to joined string, default is empty string.
-first
string, optional
String between first and second element, default is -join param.
-last
string, optional
String between second-to-last and last element, default is -join param.
Sample Usage
var:'test' = (array: 'a','b','c','d','e');
lp_array_join: $test, ', ', -front='"', -back='"', -last=' and ';
var:'in' = (lp_array_join: (: 'abc','def','ghi'), "','",-front="('", -back="')");
var:'sql' = "select * from table where mycol in " $in;
'<br>';
$sql;
Returns:
"a, b, c, d and e"
select * from table where mycol in ('abc','def','ghi')
Source Code
Click the "Download" button below to retrieve a copy of this tag,
including the complete documentation and sample usage shown
on this page. Place the downloaded ".inc" file in your
LassoStartup folder, restart Lasso, and you can begin using this
tag immediately.