If I have a string which represents a date, like \"2011/07/01\" (which is 1st July 2011) , how would I output that in more readable forms, like:
1 July 201
As for the second one:
$time1 = time(); $time2 = $time1 + 345600; // 4 days if( date("j",$time1) != date("j",$time2) && date("FY",$time1) == date("FY",$time2) ){ echo date("j",$time1)." - ".date("j F Y",$time2); }
Can be seen in action here
Just make up more conditions