Как правильно выводить по циклу эти данные ?
$monday = strtotime("last monday");
$monday = date('w', $monday)==date('w') ? $monday+7*86400 : $monday;
$sunday = strtotime(date("Y-m-d",$monday)." +6 days"); //+6 can be changed to +1,+2...so on acc to your need
$this_week_sd = date("Y-m-d",$monday);
$this_week_ed = date("Y-m-d",$sunday);
echo "Current week range from $this_week_sd to $this_week_ed ";
$vendorid = 1;
$sql4 = "SELECT * FROM vendors where datee > '".$this_week_sd."' and vendorid=1";
$result4 = mysqli_query($con, $sql4) or die(mysqli_error($sql4));
$result = mysqli_query($con, $sql4);
$result_txt = mysqli_query($con, $sql4);
if (mysqli_num_rows($result4) > 0)
{
?>
table class="table table-striped table-bordered" border='1'
tbody>
<?php
echo " tr> td>Time /td>";
while($row4 = mysqli_fetch_array($result4))
{
echo " td>".$row4['day']." /td>";
}
echo " /tr>";
while($row5 = mysqli_fetch_array($result))
{
echo " tr> td>".$row5['timee']." /td>";
while($row6 = mysqli_fetch_array($result_txt))
{
if ($row5['timee'] == $row6['timee'] )
echo " td>".$row6['text']." /td>";
}
echo " /tr>";
}
echo "";
?>
/tbody>
/table>
Выводиться только
а и цикл останавливается, как исправить ?