Skip to content

Commit 4e88dc5

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: Fixed a Serializer example
2 parents 434411a + 2e69b0b commit 4e88dc5

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
@@ -817,9 +817,10 @@ Option Description De
817817
``csv_key_separator`` Sets the separator for array's keys during its ``.``
818818
flattening
819819
``csv_headers`` Sets the order of the header and data columns
820-
E.g.: ``serialize(['c' => 3,'a' => 1,'b' => 2],
821-
'csv', ['csv_headers' => ['a', 'b', 'c']]);``
822-
returns ``a,b,c\n1,2,3 `` ``[]``, inferred from input data's keys
820+
E.g.: if ``$data = ['c' => 3, 'a' => 1, 'b' => 2]``
821+
and ``$options = ['csv_headers' => ['a', 'b', 'c']]``
822+
then ``serialize($data, 'csv', $options)`` returns
823+
``a,b,c\n1,2,3 `` ``[]``, inferred from input data's keys
823824
``csv_escape_formulas`` Escapes fields containg formulas by prepending them ``false``
824825
with a ``\t`` character
825826
``as_collection`` Always returns results as a collection, even if only

0 commit comments

Comments
 (0)