In my database I have set row \"posted\" as a timestamp but I get this notice when trying to convert/format it:
Notice: A non well formed numeric value encou
This means that the second parameter for date() is expecting integer, so convert $row['posted'] to timestamp first.
date()
$row['posted']
Try
$posted = date('d/m/Y H:i:s', strtotime($row['posted']));