I want to know how to add new rupees symbol before the amount. This is my code below but it is not working
$number = 1234.65;
setlocale(LC_MONETARY, 'en_IN.UTF-8');
echo money_format('%n', $number);
This is original symbol **
₹
**
I want to know how to add new rupees symbol before the amount. This is my code below but it is not working
$number = 1234.65;
setlocale(LC_MONETARY, 'en_IN.UTF-8');
echo money_format('%n', $number);
This is original symbol **
**
The UtF-8 code for ₹ is ₹
. Try using that instead.
Hi there vijesharora16,
try it like this - ( decimal )…
<?php
$number = 1234.65;
setlocale(LC_MONETARY, 'en_IN.UTF-8');
echo money_format('₹%!n', $number);
?>
…or this - ( hex )…
<?php
$number = 1234.65;
setlocale(LC_MONETARY, 'en_IN.UTF-8');
echo money_format('₹%!n', $number);
?>
coothead
Thanks mate, this works.
Thanks mate you too, this works.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.