0

I am developing a site Zend based but I have the followin problem:

$currency = new Zend_Currency();
$currency->toCurrency(20, array('currency' => 'EUR','number_format' => '#0.#'));

Gives me 20,00 EUR but I need 20.00 EUR (that is why i set number_format), Any suggestion?

José Carlos
  • 1,005
  • 16
  • 29

1 Answers1

2

Try changing number_format to just format.

Excerpt from Zend_Currency Docs in reference to the options array('format' =>'#0.00'):
format: Defines the format which should be used for displaying numbers. This number-format includes for example the thousand separator. You can either use a default format by giving a locale identifier, or define the number-format manually. If no format is set the locale from the Zend_Currency object will be used.

RockyFord
  • 8,529
  • 1
  • 15
  • 21
drew010
  • 68,777
  • 11
  • 134
  • 162