Running PHP on one full column.

Running PHP on one full column.

SnaackySnaacky Posts: 1Questions: 0Answers: 0
edited April 2013 in General
This is how my current DataTables are set up.

http://i.imgur.com/XNl1xiY.png (I blurred out the irrelevant parts)

As you can see in the last row, those are Unix timestamps. The problem is that these are not easily readable. I was wondering if something like this is possible. I'll use the first timestamp in the image as an example. If I wanted to get this to a human readable date, this is how I'd do it in PHP.

[code]
<?php the_time( 'F jS, Y', '1363736217' ); ?>
[/code]

That would give me the date. Now, is there a way that I could make it so it does that for each and every time stamp in the fourth row? The last row is the only row that contains timestamps. I was thinking there might be a way to do it using 'sDom' possibly? Sorry that I probably seem like a noob, I found out about DataTables literally 40 minutes ago. Thank you.

EDIT: I forgot to mention that all of the data is grabbed via MySQL. So there is no HTML for the contents in each row, the only HTML is for the table headers.

Replies

  • scburns123scburns123 Posts: 1Questions: 0Answers: 0
    Hey Snaacky, Were you able to figure this one out? I am currently tackling this exact problem.
This discussion has been closed.