-
Notifications
You must be signed in to change notification settings - Fork 1
Concat
Maxim Stupakov edited this page May 28, 2018
·
2 revisions
Concatenates the values of a column. The non-array values are converted to string and concatenated into the resulting string. The array values are merged into the resulting array.
During concatenation the boolean values are converted to '1' for true and '0' for false values.
$sloth = Sloth::from($data)
->group('foo', 'baz')
->concat();
$sloth->print();
foo baz one 123 two 4567
print_r($sloth->fetch());
Array ( [0] => Array ( [foo] => one [baz] => 123 ) [1] => Array ( [foo] => two [baz] => 4567 ) )