Skip to content

Commit 7da700f

Browse files
committed
Merge branch '5.1' into 5.2
* 5.1: Fixed a Serializer example
2 parents 850f022 + 4e88dc5 commit 7da700f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

components/serializer.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -898,9 +898,10 @@ Option Description De
898898
``csv_key_separator`` Sets the separator for array's keys during its ``.``
899899
flattening
900900
``csv_headers`` Sets the order of the header and data columns
901-
E.g.: ``serialize(['c' => 3,'a' => 1,'b' => 2],
902-
'csv', ['csv_headers' => ['a', 'b', 'c']]);``
903-
returns ``a,b,c\n1,2,3 `` ``[]``, inferred from input data's keys
901+
E.g.: if ``$data = ['c' => 3, 'a' => 1, 'b' => 2]``
902+
and ``$options = ['csv_headers' => ['a', 'b', 'c']]``
903+
then ``serialize($data, 'csv', $options)`` returns
904+
``a,b,c\n1,2,3 `` ``[]``, inferred from input data's keys
904905
``csv_escape_formulas`` Escapes fields containg formulas by prepending them ``false``
905906
with a ``\t`` character
906907
``as_collection`` Always returns results as a collection, even if only

0 commit comments

Comments
 (0)