Generating empty tags in another way #202
Answered
by
weirdan
uncrackable404
asked this question in
Q&A
-
Hello everybody,
Current result:
Result I would like:
It is possible to achieve this result with this library, |
Beta Was this translation helpful? Give feedback.
Answered by
weirdan
Dec 14, 2022
Replies: 1 comment 1 reply
-
Passing an empty array for that element should do the trick: (new Spatie\ArrayToXml\ArrayToXml([
'valore1' => 'ciao',
'valore2' => [], // <===============
]))->prettify()->toXml(); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
uncrackable404
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Passing an empty array for that element should do the trick: