Zend currency custom format like "$ 1,234.56 USD"
- by Jorre
I'm using the zend currency module to manage currencies in a web app.
I can't figure out how to create a custom format for my currencies, since there are no examples on the documentation pages: http://framework.zend.com/manual/en/zend.currency.options.html
From what I read there, I could use the format parameter to set a format, but I can't find a way how. Does anyone have a good code example for this problem?
currently I do the following:
$currency->setFormat(array (display' => Zend_Currency::USE_SYMBOL));
That works to display only the symbol, but I'm also interested in putting an extra space after or before the symbol and to display currencies like this:
"$ 1,234.56 USD"
"€ 1.234,56 EUR"