Home | Scripts | Tutorials | Books | Hosting | Forums | Links|

Navigation:

Home
Source code
Tutorials
RSS feeds
Articles
Books
Software
Downloads
Hosting
manuals
Forums
Script directory
Training
Our Links

ADD TO Progged Progged
ADD TO DEL.ICIO.US Del.icio.
ADD TO DIGG Digg
ADD TO FURL Furl
ADD TO NEWSVINE Newsvine
ADD TO NETSCAPE Netscape
ADD TO REDDIT Reddit
ADD TO STUMBLEUPON StumbleUpon
ADD TO TECHNORATI FAVORITES Technorati
ADD TO SQUIDOO Squidoo
ADD TO WINDOWS LIVE Windows Live
ADD TO YAHOO MYWEB Yahoo MyWeb
ADD TO ASK Ask
ADD TO GOOGLE Google
ADD TO MAGNOLIA Magnolia
ADD TO SPURL Spurl



 
 

SPONSORS



 
 

Display the month graphically

This is a useful little technique that you can put in your own scripts , the actual retrieving of the month itself is very straightforward but the interesting part is the graphics part which displays this as an actual image and this will be the first of many examples which will hopefully get the old creative juices going.

Code :

<?php
//our image directory
$images = "./images";
//store the month in $month
$month = date("m");
//generate our graphics
for($i=0; $i< strlen($month);$i++)
{
$imagesrc = $images ."/" . substr($month , $i , 1) . ".gif";
$imagehtml .= "<img src = \"$imagesrc\" border=\"0\">";
}
//display the graphical month
echo "$imagehtml";
?>

Example :