i'm using date() function after fetching data from database i'm feeding it into date() function.
it works for every other input but fails for 0000-00-00 00:00:00 in this case it returns 01:01(but i want 00:00)
here is my code :
<?php
$timestamp = "0000-00-00 00:00:00";
echo date('d:m', strtotime(str_replace('-','/', $timestamp)));
i want to display it inside <title>
tag something like this
title="<?php echo @date('d:m', strtotime(str_replace('-','/', $timestamp))); ?>"
QUESTION:It is returning 01:01 for 0000-00-00 00:00:00 for others working fine how to make it to return 00:00(for 0000-00-00 00:00:00) ?
please help me thanks in advance