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.

160<br />

CHAPTER 4 ■ BUILD AN EVENTS CALENDAR<br />

Figure 4-7. The calendar with the header, footer, <strong>and</strong> CSS styles applied<br />

Outputing HTML to Display Full Event Descriptions<br />

The next step in this application is to allow the user to view the details of an event. This will be done in<br />

three steps:<br />

1. Create a method to format an array of a single event’s data when loaded <strong>by</strong> ID.<br />

2. Create a method to generate markup containing the data as loaded <strong>by</strong> the first<br />

method.<br />

3. Create a new file to display the markup generated <strong>by</strong> the second method.<br />

Creating a Method to Format Single Event Data<br />

Similar to _createEventObj(), the purpose of this method, which you’ll call _loadEventById(), is to<br />

generate an Event object from the result set returned <strong>by</strong> _loadEventData().

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

Saved successfully!

Ooh no, something went wrong!