I have this simple code below working perfectly. It's retrieving data out of my database nicely.
The thing is, i need to retrieve the last number(not index) that is showing in the "saleNumber" row. I'm gonna use it to increment the number of a form input text automatically.
I've tried to use end and array_slice in dozens of differents ways but could find a solution for this.
<?php
while($row = mysqli_fetch_assoc($result)){
echo "<td class='contentTd'> $row[saleNumber] </td>
<td class='contentTd'> $row[saleValue] </td>
<td class='contentTd'> $row[paymentMethod] </td>
<td class='contentTd'> $row[sellerName] </td>";
};
I appreciate any ideas.