Forums

the_time(): numeric result? (1 post)

  1. g10r3
    Member
    Posted 1 year ago #

    Hi!
    I'm quite new to wordpress/php/css...

    I need to get the date (day) of the post and do this (simple) mathematical expression:

    - ((day -1) * 64)

    The problem is that the string i've written seems wrong...

    this is the code:
    -<?php $echo ((the_time('j') - 1) * 64); ?>px;">

    but this is what i get in theresulting html:
    date of the post: 27
    result in html: -27-64

    date of the post: 24
    result in html: -24-64

    date of the post: 31
    result in html: -31-64

    i've tried several times, but it always seem that the output of the_time() is considered as a text string and not as a number.

    What can I do? Wich is the right php string?

    Sorry for my poor English and.. thank u for your help!
    g10r3

Topic Closed

This topic has been closed to new replies.

About this Topic