File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -83,20 +83,20 @@ You can also use multi dimensional arrays::
8383
8484.. tip ::
8585
86- If the key of the array contains a dot ``. `` or a left squared bracket ``[ ``,
87- it is possible to escape these characters with a backslash. In the above example,
88- if the array key `` first_name `` becomes `` first.name ``, accessing the value can
89- be achieved like this ::
86+ If the key of the array contains a dot ``. `` or a left square bracket ``[ ``,
87+ you must escape those characters with a backslash. In the above example,
88+ if the array key was `` first.name `` instead of `` first_name ``, you should
89+ access its value as follows ::
9090
9191 var_dump($propertyAccessor->getValue($persons, '[0][first\.name]')); // 'Wouter'
9292 var_dump($propertyAccessor->getValue($persons, '[1][first\.name]')); // 'Ryan'
9393
94- Right squared brackets ``] `` don't need to be escaped.
94+ Right square brackets ``] `` don't need to be escaped in array keys .
9595
96- .. versionadded :: 6.3
96+ .. versionadded :: 6.3
9797
98- Escaping dots and left squared bracket in a property path was
99- introduced in Symfony 6.3.
98+ Escaping dots and left square brackets in a property path was
99+ introduced in Symfony 6.3.
100100
101101Reading from Objects
102102--------------------
You can’t perform that action at this time.
0 commit comments