title: How to format a number 1000 as "1 000"
body: <p>I need a way to format numbers. I stored some numbers in my DB table, e.g. <code>12500</code>, and would like to print them in this format <code>12 500</code> (so there is a space every 3 digits). Is there an elegant way to do this?</p>