some of array_unique values are undefined?
<p>I'm using array_unique to remove duplicates from an array, but even though the counter is right, and the number of the elements is right, some of its elements are displayed as undefined!</p>

<pre><code>$varietals=array_unique($varietals1);

$countVarietals = count($varietals);
</code></pre>

<p>I'm listing results with jquery </p>

<pre><code>var Varietal = data.Varietal;
var countVarietal = data.countVarietal;
//  alert(countVarietal);
$("#selectVarietal").html("");
for(var i = 0; i &lt; countVarietal; i++){

    $("#selectVarietal").append("&lt;label&gt;&lt;input type='checkbox' class='wineTypeCheck'  name='Varietal' value='"+Varietal[i]+"' /&gt;"+Varietal[i]+"&lt;/label&gt;&lt;br /&gt;");
}       
</code></pre>

<p>Anybody familiar with this?
thank u in advance!</p>
