I am using Symfony, but I think this is a general PHP problem to solve.
$yaml[UtilInc::getSfEnvironment()]['a']['b'] = "'1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '15', '16'";
to make my yml file store:
a: { b: '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '15', '16'}
but it just kept storing it as:
a: { b: '''1'', ''2'', ''3'', ''4'', ''5'', ''6'', ''7'', ''8'', ''9'', ''10'', ''11'', ''12'', ''13'', ''15'', ''16'''}
I have tried various pattern such as escaping, used double quotes with combination of single quotes, etc., but I still couldn’t get the result I want.
Any ideas?
Thanks.
If we are talking about PHP without framework or whatever you are using, including
'in a string is as simple as this:will output:
I don’t know what symphony is, but if you are trying to assign an array to index
bhere’s how:or if you want to have each element single quotes
':