• hi there, i’m trying to tweak the_date and wrap it in a ul but my script doesnt seem to work

    <?php
    //parse date to list
    $mydate = the_date("M.d.y");
    print("<ul class=\"datelist\">n");
    $tok = strtok($mydate, ".");

    $the_dateloopnum = 1;
    while ($tok) {

    if($the_dateloopnum==1){
    $dateclass = "month";
    }
    if($the_dateloopnum==2){
    $dateclass = "day";
    }
    if($the_dateloopnum==3){
    $dateclass = "year";
    }

    print("<li class=\"$dateclass\">$tok</li>n");
    //below closes date token
    $tok = strtok(".");
    $the_dateloopnum++;
    }
    print("</ul>n");
    ?>

    it outputs the date outside of the ul and doesnt print the li’s either…. like:

    Apr.25.05<ul class="datelist">
    </ul>

    anyone see whats wrong?

    thanks alot….

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘put the_date in ul with format in li’s’ is closed to new replies.