generating 4 digit figures adding comma(), & dot (.)

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Locked
adsegzy
Forum Contributor
Posts: 184
Joined: Tue Jul 28, 2009 9:26 am

generating 4 digit figures adding comma(), & dot (.)

Post by adsegzy »

Hello my Success-Oriented Friends,

Firstly, how do i code my MT_RAND() command to generate just 4 digit numbers for my PIN and confirmation.

Secondly, how do i make the number entered into one of the fields in my form to appear as currency. I want dot (.) to com after the first two digits and comma(,) after every 3 digits for it to look like this (1,234,567.89).

Regards
adsegzy
robnet
Forum Commoner
Posts: 85
Joined: Mon Aug 10, 2009 8:32 am
Location: South East, UK

Re: generating 4 digit figures adding comma(), & dot (.)

Post by robnet »

User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: generating 4 digit figures adding comma(), & dot (.)

Post by John Cartwright »

Duplicate. Locked.
Locked