1

我创建了以下内容,如果我回显 $CaRate 我会得到预期值,但是当我将它放入单元格时不会生成 pdf。

setlocale(LC_MONETARY, 'en_US');
$CaRate = money_format('%(#5n', $data[0]['data']['CarrierRate']) . "\n";

$pdf->Cell(30,8, $CaRate ,0,0,'L');
4

1 回答 1

0
$pdf->Cell(22,6,sprintf('%.2f',$BAmt),'B',0,'R',0);

详细信息:https ://www.experts-exchange.com/questions/24696443/I-need-to-know-how-to-format-currency-using-PHP-and-the-FPDF-library.html

于 2017-01-12T01:30:06.037 回答