note 87171 added to book.array
| From: | arfan at micromerger dot com | Date: | Sat, 22 Nov 2008 09:05:45 +0000 |
| Subject: | note 87171 added to book.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-146828@lists.php.net to get a copy of this message | ||
hi to all friends,
i need some help regarding Array functions.
I want to calculate the number of occurrences of an array element
for example
$myarr=array('google','yahoo','gamil','yahoo','msn','yahoo','google');
now i want a function which tell me how much time a keyword found in array like
$googlecount=foundarray('google',$myarr);
and so i can get 2 .
please help me if any one know about this problem.
thanks
----
Server IP: 69.147.83.197
Probable Submitter: 58.65.155.154
----
Manual Page -- http://www.php.net/manual/en/book.array.php
Edit -- https://master.php.net/note/edit/87171
Del: integrated -- https://master.php.net/note/delete/87171/integrated
Del: useless -- https://master.php.net/note/delete/87171/useless
Del: bad code -- https://master.php.net/note/delete/87171/bad+code
Del: spam -- https://master.php.net/note/delete/87171/spam
Del: non-english -- https://master.php.net/note/delete/87171/non-english
Del: in docs -- https://master.php.net/note/delete/87171/in+docs
Del: other reasons-- https://master.php.net/note/delete/87171
Reject -- https://master.php.net/note/reject/87171
Search -- https://master.php.net/manage/user-notes.php