nielsv
nielsv

Reputation: 6810

Symfony YML + Don't add ' to string with multiple words

I'm looking for strings in a file and save them to a yml file.
When the string is one word like Map it shows Map in the yml file. But if the string is Permit Total I get 'Permit Total'.

How can I fix this? (That it just prints Permit Total)

I'm using the symfony\yaml library.

Upvotes: 4

Views: 736

Answers (1)

Joel Christophel
Joel Christophel

Reputation: 2663

In YAML, single and double quotes are used to denote a String and aren't actually part of the String value. In other words, Map and 'Map' are equivalent.

When you parse the YAML file to retrieve a String with double or single quotes around it, the quotes won't be included.

Take a look: http://en.wikipedia.org/wiki/YAML#Syntax

Upvotes: 6

Related Questions