Все данные выводятся в таблицу отлично, кроме даты. В базе данных тип поля DATETIME.
А когда я просто в коде вывожу эту переменную через echo, то она отображается отлично.
<body>
<?php
$query = "SELECT * FROM payeer_table ORDER BY date_time DESC";
$result = mysqli_query($connect, $query);
$htmlToDisplay = ''; //this variable will contain table rows
if (mysqli_num_rows($result) > 0) {
// output data of each row
while ($row = mysqli_fetch_assoc($result)) {
$phpdate = strtotime( $row["date_time"] );
$formated_date = date( 'd.m.Y H:i:s', $phpdate );
$htmlToDisplay .="<tr>
<td>".$row["login"]."</td>
<td>".$row["payeer"]."</td>
<td>".$row["money_income"]."</td>
<td".$formated_date."</td>
</tr>";
}
} else {
$htmlToDisplay = "<tr><td>0 results</td><tr>";
}
?>
<table class=" blueTable">
<thead>
<tr>
<th>login</th>
<th>payeer</th>
<th>money_income</th>
<th>date_time</th>
</tr>
</thead>
<tbody>
<!-- echo your php row(s) here in a slightly neater way since it's one line -->
<?php echo $htmlToDisplay;
echo $formated_date;
?>
</tbody>
</table>
</body>
<td".$formated_date."</td>=><td>".$formated_date."</td>– InDevX Jul 10 '21 at 10:45<td>не закрыл, какая переменная в саму себя. – u_mulder Jul 10 '21 at 11:28