how can I sort these two arrays date wise one array has all the dates please tell me a way to fix this problem The code i tried
<?php
$date=array("2018-09-28","2018-11-26","2018-12-26","2019-01-25","2019-02-25","2019-03-25","2019-04-25","2019-05-27","2019-06-25","2019-07-25","2019-08-26","2019-09-25","2019-10-25","2019-11-25","2019-12-26","2017-05-30","2017-05-31","2017-10-26","2017-10-27","2020-01-04");
$amount=array("-1000","-1000","-1000","-1000","-1000","-1000","-1000","-1000","-1000","-1000","-1000","-1000","-1000","-1000","-1000","-50000","-50000","-70000","-69414","276521");
$count= count($date);
echo "<table>"
echo "<tr>";
echo "<th>DATES</th>";
echo "<th>Amount</th>";
echo "</tr>";
for($i=0;$i<$count;$i++)
{
echo "<tr>";
echo "<td>".$date[$i]."</td>";
echo "<td>".$amount[$i]."</td>";
echo "</tr>";
}
?>