Member Avatar for toutanne
toutanne

Hi,

I'm using this script

http://www.daniweb.com/web-development/php/threads/68355

and i would like to know if it's possible to have the number like 1 000 000 instead 1000000?

i found a function like this

function lisibilite_nombre(nbr)
{
		var nombre = ''+nbr;
		var retour = '';
		var count=0;
		for(var i=nombre.length-1 ; i>=0 ; i--)
		{
			if(count!=0 && count % 3 == 0)
				retour = nombre[i]+' '+retour ;
			else
				retour = nombre[i]+retour ;
			count++;
		}
		alert('nb : '+nbr+' => '+retour);
		return retour;
}

but dont know how to put it inside

someone can help me please?

thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.