1

I am looking to echo an amount which is in numeric form as words on a receipt. My code looks like this:

<tr>
<td width="77" style="text-align: center; font-weight: bold;">Center</td>
<td width="210" style="text-align: center; font-weight: bold;">Amount</td>
</tr><tr><td width="33" style="text-align: center; font-weight: bold;">1</td>
<td width="132" style="text-align: center; font-weight: bold;">
  <?php echo    $row[11] ?></td>
<td width="77" style="text-align: center; font-weight: bold;">
 <?php echo $row[12] ?></td>
  <td width="210" style="text-align: center; font-weight: bold;">
  <?php echo $row[3]   ?></td></tr></table>    <tr>
  <td height="32">   <p>Received with thanks Rs.....</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
</td>

So I want the value from Amount to be placed at "Received with thanks Rs.

Thomas Fenzl
  • 4,342
  • 1
  • 17
  • 25

1 Answers1

0

Well PHP does not support that (number to words) logic yet.

Make use of this

After including that...Rewrite your code like

<p>Received with thanks Rs. <?php echo convert_number_to_word($row[3]); ?></p>
Shankar Narayana Damodaran
  • 68,075
  • 43
  • 96
  • 126