View Single Post
Old 10-29-2008, 05:06 PM   #1 (permalink)
buildakicker
The Acquainted
 
buildakicker's Avatar
 
Join Date: Jan 2008
Posts: 119
Thanks: 21
buildakicker is on a distinguished road
Confused Array Match String

Hi all,

I was wondering why this doesn't work?

Code:
<?php
$todayis = date('F jS Y');

$hday = array("October 28th 2008", "November 11th 2008", "November 27th 2008", "December 25th 2008", "January 1st 2009", "January 19th 2009", "February 16th 2009", "May 25th 2009", "July 3rd 2009", "September 7th 2009", "October 12th 2009", "November 11th 2009", "November 26th 2009", "December 25th 2009");

if (in_array($todayis,$hday))
  {
  echo "Match found";
  }
else
  {
  echo "Match not found";
  }
?>
Can I not use a Variable($todayis), but have to use a string?
__________________
SkiLeases.com
buildakicker is offline  
Reply With Quote