ereg on date and time
Posted: Tue Jul 21, 2009 10:41 am
Hi
I have a date and time in one column as for example 2008-04-16 10:41:20.
I would like to do a ereg_replace so that the date and time will be converted only to date as 2008/04/16
I want to add the code to this
echo '<p> <a href=" '/' . $row['post_date'] . '/' . $row['post_name'] . '/ ">' . $row['post_title'] . '</a> <br>'. strip_tags(substr($row['post_content'],0,300)) . '';
so that $row['post_date'] changes to the new date structure and the URL will now read
http://www.bambooclat.com/2008/04/16/post_name/
thanks a bunch
Neal
I have a date and time in one column as for example 2008-04-16 10:41:20.
I would like to do a ereg_replace so that the date and time will be converted only to date as 2008/04/16
I want to add the code to this
echo '<p> <a href=" '/' . $row['post_date'] . '/' . $row['post_name'] . '/ ">' . $row['post_title'] . '</a> <br>'. strip_tags(substr($row['post_content'],0,300)) . '';
so that $row['post_date'] changes to the new date structure and the URL will now read
http://www.bambooclat.com/2008/04/16/post_name/
thanks a bunch
Neal