Skip to content

Commit 11d0066

Browse files
committed
docs: decorate text
1 parent 16317db commit 11d0066

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

user_guide_src/source/helpers/array_helper.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,25 @@ The following functions are available:
3030
:rtype: mixed
3131

3232
This method allows you to use dot-notation to search through an array for a specific-key,
33-
and allows the use of a the '*' wildcard. Given the following array:
33+
and allows the use of a the ``*`` wildcard. Given the following array:
3434

3535
.. literalinclude:: array_helper/002.php
3636
:lines: 2-
3737

38-
We can locate the value of 'fizz' by using the search string "foo.buzz.fizz". Likewise, the value
39-
of baz can be found with "foo.bar.baz":
38+
We can locate the value of ``fizz`` by using the search string ``foo.buzz.fizz``. Likewise, the value
39+
of ``baz`` can be found with ``foo.bar.baz``:
4040

4141
.. literalinclude:: array_helper/003.php
4242
:lines: 2-
4343

44-
You can use the asterisk as a wildcard to replace any of the segments. When found, it will search through all
44+
You can use the asterisk (``*``) as a wildcard to replace any of the segments. When found, it will search through all
4545
of the child nodes until it finds it. This is handy if you don't know the values, or if your values
4646
have a numeric index:
4747

4848
.. literalinclude:: array_helper/004.php
4949
:lines: 2-
5050

51-
If the array key contains a dot, then the key can be escaped with a backslash:
51+
If the array key contains a dot (``.``), then the key can be escaped with a backslash (``\``):
5252

5353
.. literalinclude:: array_helper/005.php
5454
:lines: 2-
@@ -86,16 +86,16 @@ The following functions are available:
8686
.. literalinclude:: array_helper/007.php
8787
:lines: 2-
8888

89-
The ``$players`` array is now sorted by the 'order' value in each players'
90-
'team' subarray. If this value is equal for several players, these players
91-
will be ordered by their 'position'. The resulting array is:
89+
The ``$players`` array is now sorted by the ``order`` value in each players'
90+
``team`` subarray. If this value is equal for several players, these players
91+
will be ordered by their ``position``. The resulting array is:
9292

9393
.. literalinclude:: array_helper/008.php
9494
:lines: 2-
9595

9696
In the same way, the method can also handle an array of objects. In the example
97-
above it is further possible that each 'player' is represented by an array,
98-
while the 'teams' are objects. The method will detect the type of elements in
97+
above it is further possible that each ``player`` is represented by an array,
98+
while the ``teams`` are objects. The method will detect the type of elements in
9999
each nesting level and handle it accordingly.
100100

101101
.. php:function:: array_flatten_with_dots(iterable $array[, string $id = '']): array
@@ -137,9 +137,9 @@ The following functions are available:
137137
The example shows some data (i.e. loaded from an API) with nested arrays.
138138

139139
.. literalinclude:: array_helper/012.php
140-
141-
We want to group them first by "gender", then by "hr.department" (max depth = 2).
142140
:lines: 2-
141+
142+
We want to group them first by ``gender``, then by ``hr.department`` (max depth = 2).
143143
First the result when excluding empty values:
144144

145145
.. literalinclude:: array_helper/013.php

0 commit comments

Comments
 (0)