title: How can i add some key values in existing yaml file in php symfony
body: <p>I have one YAML file like this</p>
  
  <pre><code>  category: 'test'
    available: true
    class: true
    name: 'john'
    children:
      -
        id: fdfd5
        f2: 30
  </code></pre>
  
  <p>Now before that name field i  want to add one more file like</p>
  
  <p><code>displayname = This is your $name</code> where $name is name from same category.</p>
  
  <p>This is what i am thinkling of</p>
  
  <pre><code>//read
  $yaml = Yaml::parse(file_get_contents('/path/to/file.yml'));
  
  
  //code here    
  
  //write
  $dumper = new Dumper();
  
  $yaml = $dumper-&gt;dump($array);
  
  file_put_contents('/path/to/file.yml', $yaml);
  </code></pre>
  
  <p>How can i get $array to what i want</p>