Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- writing long numbers with delimiters
March 18, 2007, 2:02 pm
rate this thread
numebrs of seconds since my site is born. or since I'm born. this isn't
problem ($diff = time() - mktime($begining) but it looks ugly on screen:
using this two functions substr(chunk_split($diff, 3, '.'), 0, -1);
I'm lucky with my site: 277142273 seconds = 277.142.273
but with myself: 1257865147 seconds = 125.786.514.7
so I would like to echo 1.257.865.167 ...can someone help me with this?
(I know I have seen it somewhere before, but now I can't find where)
thank you! :)
Re: writing long numbers with delimiters
By thw way, if you wanted to use chunk_split and substr, you should
first reverse the string, then chunksplit it, then reverse again to get
correct separation for the numbers. ;)
"Olemme apinoiden planeetalla."