I am trying to get this piece of code to input something along the lines of "received (this many points) for (reason for points). So far I have this.
if ($resultss->num_rows > 0) {
// output data of each row
while($row2 = $resultss->fetch_assoc()) {
echo "Received " . $row2["id_points"]. " points for " . $row2['id_task']."<br>";
}
} else {
echo "0 results";
}
So far, my code is almost working. This is the input. "Received 15 points for 1" As you can see, the problem is that the reason is the number that is stored in the sql database. I want to know how I can convert that number into words. Thank you for your response in advance