php mktime function producing wierd symbols -


i trying adapt calendar script david walsh. in david's script showing monthly calendar, first week shows blanks before month start commenter said can use following code display dates previous month ie 28 20 30 depending on when first day of month falls.

i won't repeat of code script linked to, main thing replacement code displays symbol have never seen before.., �30�. (i have copied these symbols source. squares ff above pd.). here code. note $x, $running_day , $daysinthisweek numbers. $calendar gets echoed @ end.

//following prints out empty table cells  for($x = 0; $x < $running_day; $x++):         $calendar.= '<td class="calendar-day-np">&nbsp;</td>';         $days_in_this_week++;     endfor; echo $calendar; 

//but following, echoed, prints out wierd symbols:

$daysinlastmonth = date(‘t’,mktime(0,0,0,$month-1,1,$year)); 

then when loop through above whole bunch of wierd symbols.

for($x = 0; $x < $running_day; $x++): //this line same above $calendar.= ' . ( ( $daysinlastmonth – ( $runningday – 1 ) ) + $x ). '; $daysinthisweek++; endfor; echo $calendar; 

does know might going on, wierd symbols mean , how display properly.

thanks suggestions!

turn on errors , see have wrong quotes. errors

notice: use of undefined constant ‘t’ - assumed '‘t’'

this line

$daysinlastmonth = date(‘t’,mktime(0,0,0,$month-1,1,$year)); 

must be

$daysinlastmonth = date('t',mktime(0,0,0,$month-1,1,$year)); 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -