[eluser]Bigil Michael[/eluser]
i want to list news and events like this manner
june 2011
may 2011
april 2011
.
.
.
.
.
july 2010
i dont know how to print months like this can anyone help me??
[eluser]Bigil Michael[/eluser]
my aim is not like that
i have date like this in my table
2011-06-01
2011-06-05
2011-06-11
2011-06-15
2011-07-01
2011-07-05
2011-07-11
2011-07-15
i want to print the date like this
june 2011
july 2011
if any date in a month is present then i want to print that month.
i think now you got the problem
can anyone solve my problem??
[eluser]jmadsen[/eluser]
so follow the link vitoco posted:
http://php.net/manual/en/function.date.php
and put the parameters in the format that match what you are after.
Code:
$date = '2011-01-01' ;
echo date('M Y' , strtotime( $date ) );
After 173 posts, you should start to make an effort to look some things up on your own and try them before calling for help.
[eluser]vitoco[/eluser]
I've already solve your problem, and if that isn't enough or you don't get it...well...