Reprezent!

Out of context: Reply #7

  • Started
  • Last post
  • 14 Responses
  • jslr0

    Here's a script I wrote to deal with numeric dates. I created n image for each number ("01.gif", "02.gif" and so on) and stored them in the same folder. Widths and sizes are variable, so I used a GetImageSize.

    $date=date("d.m.y");
    $numbers=explode(".", $date);
    $day="$numbers[0].gif";
    $dsize= GetImageSize($day);
    $dwidth=$dsize[0];
    $month="$numbers[1].gif";
    $msize= GetImageSize($month);
    $mwidth=$msize[0];
    $year="$numbers[2].gif";
    $ysize= GetImageSize($year);
    $ywidth=$ysize[0];

    echo "";
    echo "";
    echo "";

    Wrote it a while back, so it's pro'lly not as efficient as it could be, but it should be a start. Should be easy to work up to month names - just make the images and name them to match up contents of the array.

    Let me know if you want me to make more sense... :)

View thread