Duplicate array elements and append to the same array
<p>is there a good way to duplicate the existing values in an array and append them to the same array? Here's what I can think pf</p>

<p><strong>PHP</strong></p>

<pre><code>$names = array('Tom', 'Dick', 'Hairy');
$names_new = $names;
$duplication = 3;
for($i = 0; i &lt; $duplication; $i++) {
    for($j = 0; $j &lt; count($names); $j++) {
        $names_new[] = $names[$j];
    }
}
</code></pre>
