[SOLVED] foreach help
Posted: Wed Jan 12, 2005 7:52 pm
I am working in a subsection of a big project and basically there is an array of holiday dates. There are 11, elements 0-10.
What I need to accomplish is checking each member in the array against today... for example:
Or if someone has a better idea of how to do this, basically I am trying to make sure that today is not a holiday (based on the array) and then if one matches today then set a flag to on so that we can say fail for the function.
Thanks for your help!
What I need to accomplish is checking each member in the array against today... for example:
Code: Select all
if($today == $holiday_arrayї$i])
{
flag = 1;
}
else
{
flag = 0;
}Thanks for your help!