title: Replacing values in a stdClass Object array
body: <p>I've been looking for a while and I can't find a way to get this to work. How can I replace values in a stdClass Object array? For example if I have this:</p>
  
  <pre><code>
  Array ( 
      [0] => stdClass Object (
              [id] => 1 
              [fruit] => 100
              [vegetable] => 200
          ) 
      [1] => stdClass Object (
              [id] => 2
              [fruit] => 100
              [vegetable] => 100
          )
      [2] => stdClass Object (
              [id] => 3
              [fruit] => 200
              [vegetable] => 200
          ) 
  )
  </code></pre>
  
  <p>How do I change the values - fruit 100 to apple, fruit 200 to peach, vegetable 100 to broccoli and vegetable 200 to lettuce - I need to end up with this:</p>
  
  <pre><code>
  Array ( 
      [0] => stdClass Object (
              [id] => 1 
              [fruit] => apple
              [vegetable] => lettuce
          ) 
      [1] => stdClass Object (
              [id] => 2
              [fruit] => apple
              [vegetable] => broccoli
          )
      [2] => stdClass Object (
              [id] => 3
              [fruit] => peach
              [vegetable] => lettuce
          ) 
  )
  </code></pre>
  
  <p>Thanks in advance for any help!</p>