How to put currency symbol beside number in php -
Try this code:
//show USD sign $
setlocale(LC_MONETARY,'en_US');
$amount=356;
echo utf8_encode(money_format('%n',$amount));
//show USD sign £
setlocale(LC_MONETARY,'en_GB');
$amount=356;
echo utf8_encode(money_format('%n',$amount));
Try this code:
//show USD sign $
setlocale(LC_MONETARY,'en_US');
$amount=356;
echo utf8_encode(money_format('%n',$amount));
//show USD sign £
setlocale(LC_MONETARY,'en_GB');
$amount=356;
echo utf8_encode(money_format('%n',$amount));
No comments
Post a Comment