02.06.2013 Views

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

148<br />

CHAPTER 4 ■ BUILD AN EVENTS CALENDAR<br />

}<br />

$cal_month = date('F Y', strtotime($this->_useDate));<br />

$weekdays = array('Sun', 'Mon', 'Tue',<br />

'Wed', 'Thu', 'Fri', 'Sat');<br />

/*<br />

* Add a header to the calendar markup<br />

*/<br />

$html = "\n\t$cal_month";<br />

for ( $d=0, $labels=NULL; $d_m && $y==$this->_y )<br />

{<br />

$class = "today";<br />

}<br />

/*<br />

* Build the opening <strong>and</strong> closing list item tags<br />

*/<br />

$ls = sprintf("\n\t\t", $class);<br />

$le = "\n\t\t";<br />

// More steps go here<br />

/*<br />

* Return the markup for output<br />

*/<br />

return $html;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!