php if empty pastWithdrawals table tr th Amount th th Agent th th Date

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
<?php
if (!empty($pastWithdrawals)) { ?>
<table>
<tr>
<th>Amount</th>
<th>Agent</th>
<th>Date</th>
</tr>
<?php foreach($pastWithdrawals as $withdrawal) {
echo "<tr>",
"<td class=withdrawalAmount>".number_format($withdrawal['curr_amount'] ,2)."</td>",
"<td class=withdrawalAgent>".$withdrawal['agent']."::".$withdrawal['fullname']."</td>",
"<td>".$withdrawal['date']."</td>";
echo "</tr>";
}
echo "</table>";
} else {
echo "No withdrawals";
}