Welcome Guest, Not a member yet? Register   Sign In
Question about the template parser
#1

[eluser]victorche[/eluser]
It is a newbie question and it is maybe more php than CI specific...
I am developing a really small and light blog application with only a few features. CI is the best for my needs.
Anyway I am using the template parser class as I prefer not to have php tags in my html.
And because my blog entries are coming from the database, in my controller I am using:
Code:
'blog_posts' => $query->result_array()
This is giving me the title, the body and the published date. So far, so good ... But my published date is timestamp so I want to do some actions about these results. I want to have a more human look of the post date. I may even use some nice dates, as described here:

http://ellislab.com/forums/viewthread/106557/

So with a few words, result_array() is giving me:
Code:
1278746700
I want it to be for example:
Code:
Saturday, July 10th 2010, 09:25:00

Please, help me and sorry for this newbie question...


Messages In This Thread
Question about the template parser - by El Forum - 07-10-2010, 12:30 AM
Question about the template parser - by El Forum - 07-10-2010, 03:15 AM
Question about the template parser - by El Forum - 07-10-2010, 03:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB