private function expandWithNumber(&$lines, $replacementToken, $min, $max) { foreach ($lines as &$line) { if (strpos($line, $replacementToken) !== FALSE) { $originalLine = $line; for ($i = $min; $i <= $max; $i++) { $generatedLine = str_replace($replacementToken, number_to_word($i), $originalLine); if ($i === $min) { $line = $generatedLine; } else { $lines[] = $generatedLine; } } } } }
<br> @if($transaction->payment_method == "Check") Cheque no: {{$transaction->cheque_no}} <br> Bank: {{$transaction->cheque_bank}} <br> Cheque Date: {{$transaction->cheque_date}} @endif </td> <td style="border:1px solid black; background-color: #E4F1F9;" class="text-center">{{$transaction->amount}}</td> </tr> <tr> <td> <span class="col-md-3">Amount in words</span> <span class="col-md-8" style="border-bottom:1px dotted black; "><?php echo number_to_word($transaction->amount); ?> Taka Only</span> </td> <td style="border:1px solid black; background-color: #E4F1F9;">Total</td> <td style="border:1px solid black; background-color: #C0DDEF;" class="text-center">{{$transaction->amount}}</td> </tr> </table> <br><br> <div class="row"> <div class="col-xs-8"> </div> <div style="border-top: 1px solid #000;" class="col-xs-4 invoice-payment text-right"> <center> <b>Authorized By</b> </center>