I have here:
<td><?php print strftime("%d %b. %Y %I:%M %p",mktime($row['c_date'])); ?></td>
and the output is
Notice: A non well formed numeric value encountered in C:\xampp\htdocs\PDO\My-Sample\class.crud.php on line 180
19 Jan. 2018 12:05 AM
I have here:
<td><?php print strftime("%d %b. %Y %I:%M %p",mktime($row['c_date'])); ?></td>
and the output is
Notice: A non well formed numeric value encountered in C:\xampp\htdocs\PDO\My-Sample\class.crud.php on line 180
19 Jan. 2018 12:05 AM
Second argument of strftime
is timestamp, and you are passing a string. Use strtotime($row['c_date'])
function in the second argument and all will be good.
Following are the arguments of strftime from the php docs.
string strftime ( string $format [, int $timestamp = time() ] )
Hence this will work
<td><?php if (isset($row['c_date'])) {
print strftime("%d %b. %Y %I:%M %p",strtotime($row['c_date']));
} ?></td>