[FX.php List] Summary of Records
Anders Monsen
andersm at alamark.com
Mon Dec 8 08:41:19 MST 2008
How about array_unique?
$theList = array('Team1','Team1','Team2','Team3','Team1','Team2' );
$uniqueList = array_unique($theList);
sort($uniqueLists);
Anders
On Dec 8, 2008, at 9:35 AM, Steve Winter wrote:
> Hi William,
>
> You could go with something like this;
>
> $uniqueList = array()
>
> foreach($teamList as $team) {
> if(!in_array($team, $uniqueList) {
> $uniqueList[] = $team;
> }
> }
>
> Then $uniqueArray will have only one entry for each $team. You may
> also then want to do a sort on that array prior to output in case
> the data that it received was
>
> Team3
> Team1
> Team3
> Team2
>
> Cheers
> Steve
>
>
>
>
> On 8 Dec 2008, at 15:05, william.downs wrote:
>
>>
>> Hi there List,
>>
>> If an array was to return more than one record, and a value was
>> repeated, how do I strip out the individual values ?
>>
>> Example :
>>
>> If the returned values were
>>
>> Team1
>> Team2
>> Team1
>> Team3
>> Team1
>>
>> I would ONLY want to see
>> Team1
>> Team2
>> Team3
>>
>> In Filemaker, I could create a value list, or a sub-summary list,
>> and this would give me the individual records.
>>
>>
>> Kindest Regards
>>
>> William
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
More information about the FX.php_List
mailing list