Zend currency custom format like "$ 1,234.56 USD"
Posted
by Jorre
on Stack Overflow
See other posts from Stack Overflow
or by Jorre
Published on 2010-03-25T15:27:30Z
Indexed on
2010/03/30
18:33 UTC
Read the original article
Hit count: 434
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"
© Stack Overflow or respective owner