You mean number_format? Hell, why not use money_format?
There's a bunch of native PHP ways to deal with it. Native PHP is definitely the way I'd tackle this problem. Widgets seem wrong - instantiating extra objects when there is native functionality? err... Automatically converting a number to a different format to that stored in the database is asking for problems - it's stored like it is for a reason. On 11 Feb 2009, at 17:41, Martino Piccinato wrote: > > widget where brought in beacuse apparently the problem was about > number formatting in forms. > > if talking about view sprintf is definitely overkill compared to > "number" > > <?php echo number($model->getPrice(), 2);?> > > ;-) > > > > On Wed, Feb 11, 2009 at 6:34 PM, Lee Bolding <[email protected]> wrote: >> >> any reason you can't use sprintf???? >> >> All this talk of filters, widgets... it's a little overkill, isn't >> it? >> >> <?php echo sprintf("%01.2f", $model->getPrice()); ?> >> > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
