Reply to Re: Checking if a value is repeated in an array

Your name:

Reply:


Posted by gosha bine on 07/10/07 10:45

On 09.07.2007 18:29 odysseyphotography wrote:
> Hi everyone,
>
> I was wondering if its possible to check if a given value appears in
> an array more than once?
>
> I need to code something which goes something along the lines of:
>
> Faux code ---
>
> if (in_array_twice($person, $already_emailed)) {
> echo $person . ' is in the array already, don't email them';
> } else {
> echo $person . ' is not in the array, its OK to email them';
> }
>
> ---
>
> If anyone has any ideas they'd be very much appreciated.
>
> Thanks,
>
> OP
>

see array_count_values() and array_unique()



--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация