title: Php: Concatenate string into all array items
body: <p>I have <a href="http://codepad.org/69O7bSbC" rel="nofollow noreferrer">this</a> PHP snippet:</p>
  
  <pre><code>&lt;?php
    $colors = array('red','green','blue');
    foreach ($colors as &amp;$item)
    {
      $item = 'color-'.$item;
    }
    print_r($colors);
  ?&gt;  
  </code></pre>
  
  <p><strong>Output:</strong> </p>
  
  <pre><code>Array
  (
    [0] =&gt; color-red
    [1] =&gt; color-green
    [2] =&gt; color-blue
  )
  </code></pre>
  
  <p>Is it simpler solution ? </p>
  
  <p>(some array php function like that <code>array_insert_before_all_items($colors,"color-")</code>)? </p>
  
  <p>Thanks</p>