Skip to Main Content
PHP 5 Kochbuch, Third Edition
book

PHP 5 Kochbuch, Third Edition

by David Sklar, Adam Trachtenberg, Carsten Lucke, Matthias Brusdeylins, Ulrich Speidel, Stephan Schmidt
September 2009
Intermediate to advanced content levelIntermediate to advanced
912 pages
48h 11m
German
O'Reilly Verlag
Content preview from PHP 5 Kochbuch, Third Edition

3.18 Programm: Kalender

Die in Listing 3.4 dargestellte Funktion pc_calendar() gibt einen Monatskalender ähnlich dem cal-Programm unter Unix aus. Hier sehen Sie, wie Sie diese Funktion verwenden können:

// Den Kalender für den aktuellen Monat ausgeben.
list($monat,$jahr) = explode(',',date('m,Y'));
pc_calendar($monat,$jahr);

Die Funktion pc_calendar() gibt eine Tabelle mit dem Kalender eines Monats aus. Sie bietet Links zum vorhergehenden und zum nachfolgenden Monat und hebt den aktuellen Tag hervor.

<?php function pc_calendar($month,$year,$opts = '') { // Vorgabeoptionen setzen // if (! is_array($opts)) { $opts = array(); } if (! isset($opts['today_color'])) { $opts['today_color'] = '#FFFF00'; } if (! isset($opts['month_link'])) { $opts['month_link'] ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PHP programmieren unter Windows

PHP programmieren unter Windows

Arno Hollosi
CSS Kochbuch, 3rd Edition

CSS Kochbuch, 3rd Edition

Joergen Lang, Christopher Schmitt

Publisher Resources

ISBN: 9783868993271Purchase book