# Function problem

**URL:** <https://forum.kirupa.com/t/function-problem/275810>\
**Category:** Uncategorized\
**Created:** [November 18, 2008, 10:30pm UTC](https://forum.kirupa.com/t/function-problem/275810 "2008-11-18T22:30:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![koolkrasher](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@koolkrasher](https://forum.kirupa.com/u/koolkrasher)\
**Post date:** [November 18, 2008, 10:30pm UTC](https://forum.kirupa.com/t/function-problem/275810/1 "2008-11-18T22:30:10Z")

</div>

I have a function that checks the date and if the date matches the currentdate then its going to include a htm file if it doesnt then include the default htm file.  
Seems to only wokr for the default.

```php

function getCandle(){
$month = date(m);
$day = date(d);
$currentDate = $month.$day; 
 if(currentDate==1221)
 {
  include("1.htm");
 }
 else if(currentDate==1222)
 {
  include("2.htm");
 }else if(currentDate==1223)
 {
  include("3.htm");
 }else if(currentDate==1224)
 {
  include("4.htm");
 }else if(currentDate==1225)
 {
  include("5.htm");
 }else if(currentDate==1226)
 {
  include("6.htm");
 }else if(currentDate==1227)
 {
  include("7.htm");
 }else if(currentDate==1228)
 {
  include("8.htm");
 }else
 {
  include("default.htm");
 }
}

```

if it works off of the server clock wich in my case i guess would be localhost, current date shows todays date but the conditional doest reconize it.

any one have any ideas whats up with this?
