PHP Loop Over ONLY Different Arrays
<p>I have a single array with several of the same values. And I only want to loop over DIFFERENT values. How could I go about doing this?</p>

<p>Example</p>

<pre><code>166-01 001;09;UO;
166-01 001;09;UO;
166-01 001;09;UO;
166-01 001;09;UO;
166-01 001;09;UO;
166-01 001;09;UO;
166-01 001;09;UO;_86
166-01 001;09;UO;_86
166-01 001;09;UO;_86
166-01 001;09;UO;_86
166-01 001;09;UO;_86
166-01 001;09;UO;_86_97
166-01 001;09;UO;_86_97
166-01 001;09;UO;_86_97
166-01 001;09;UO;_86_97_108
166-01 001;09;UO;_86_97_108
166-01 001;09;UO;_86_97_108_119
166-01 001;09;UO;_86_97_108_119
</code></pre>

<p>I have that in a single array, but I only want to loop for the different ones. So it would loop once for nothing, then once for _86, then once for _86_97, then once for _86_97_108, and then once for _86-97_108_119. So only loop for different key values, </p>

<p>or would there be a way to count the number of different keys?</p>
