Yii Framework Forum: formatter as currency, add space after dollar sign ? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

formatter as currency, add space after dollar sign ?

#1 User is offline   nguyendh 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 260
  • Joined: 21-March 11

Posted 19 May 2017 - 01:14 PM

<?= Yii::$app->formatter->asCurrency(100); ?> 


shows "$100". I want it to have spaces between $ and 100. e.g. "$ 100"

How can I do that ?
0

#2 User is offline   nguyendh 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 260
  • Joined: 21-March 11

Posted 07 July 2017 - 04:26 PM

any idea ?
0

#3 User is offline   Roberto Braga 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 170
  • Joined: 18-February 13
  • Location:Roma, Italy

Posted 09 July 2017 - 03:22 PM

Yii wrap php class for formatting numbers
http://php.net/manua...erformatter.php

This is the ICU way to format en_us currency.

I looked at manual and I think there is nothing about adding space between currency symbol and the value.
Try to check yourself the PHP manual maybe I missed something.
Sorry for not being more useful.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users