Article View: pl.comp.lang.php
Article #483Re: PHP tablice i ilosc powtarzajacych sie stringow
From: pandp
Date: Tue, 21 Aug 2001 12:28
Date: Tue, 21 Aug 2001 12:28
24 lines
1398 bytes
1398 bytes
"[sis]" <sisqo@board.pl> wrote in message news:9ltju5$7b5$1@news.tpi.pl...
> Witam,
>
> zakladajac tablice:
>
$array=array("kot","pies","krowa","mysz","kot","pies","krowa","kot","pies","
> krowa");
>
> jak sprawdzic, nie tylko:
> 1. ile jest roznych elementow jak poprzez array_unique($array); (thnx
pandp)
> ale rowniez:
> 2. ile razy sie powtorzyly?
>
> cos w rodzaju:
> $tablica[kot]=3, $tablica[pies]=3, $tablica[krowa]=3, $tablica[mysz]=1.
>
> zalezy mi na mozliwie najszybszym algorytmie - tablica ok. 5000 elementow
do
> porownania.
array_count_values - Counts all the values of an array
pandp
Technical Details
Message-ID:
<3b825574@news.home.net.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!news.home.net.plReferences:
<9ltju5$7b5$1@news.tpi.pl>Show Full Headers
Complete Article Headers
From: "pandp" <pandp@home.pl> Newsgroups: pl.comp.lang.php References: <9ltju5$7b5$1@news.tpi.pl> Subject: Re: PHP tablice i ilosc powtarzajacych sie stringow Date: Tue, 21 Aug 2001 14:28:44 +0200 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 213.25.123.2 Message-ID: <3b825574@news.home.net.pl> X-Trace: 21 Aug 2001 14:35:00 +0200, 213.25.123.2 Organization: HomeNet News Server X-Authenticated-User: pandp Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!news.home.net.pl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit