Wednesday, October 7, 2015

How to put currency symbol beside number in php

How to put currency symbol beside number in php -  Try this code: //show USD sign $ setlocale(LC_MONETARY,'en_US'); $amount=... thumbnail 1 summary
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));

No comments

Post a Comment