You are here: Re: Problem with arrays « PHP Programming Language « IT news, forums, messages
Re: Problem with arrays

Posted by Bob Stearns on 12/18/84 11:51

iblamemicrosoft@gmail.com wrote:

> What I'm trying to do is check if the dates in the array $holi[]
> matches $evalday (not in an array)
> but with limited success the data in the array is:
>
> $holi[1] = 2006-06-20;
> $holi[2] = 2006-06-28;
> $holi[3] = 2006-07-19;
> $holi[4] = 2008-06-24;
> $holi[5] = 2006-06-30;
>
> $evalday = date("Y-m-d", strtotime("+ 1 days");
>
> if($evalday == $holi) {
> echo("For the purpose of this excercise, $evalday is a holiday");
> }
>
> Thanks in advance.
>
You either have to test each element separately [foreach()
if($holiday = $evalday)...] or use the builtin function
inarray($evalday, $holi).

 

Navigation:

[Reply to this 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

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