|
Author |
Message |
Kdawg
Senior WebHelper
Joined: 21 Apr 2003
Posts: 153
|
Posted:
Mon Apr 28, 2003 11:19 pm (21 years, 1 month ago) |
|
I got two questions both about php, is there a way to turn numbers into percents, like .21910 = 22%? Is there a way to check for posting fields, like if someone makes an html form and has 2 fields in it, the script will store the info of these 2 fields to 2 vaiables witout having to manually put $_POST[name] in the script? |
|
|
|
|
jayant
Team Member
Joined: 07 Jan 2002
Posts: 262
Location: New Delhi, India
|
Posted:
Tue Apr 29, 2003 5:22 am (21 years, 1 month ago) |
|
To turn to percent:-
$number = 0.21910;
$percent_number = round($number*100);
question2:
what exactly do u want? the script should handle the $_POST[name] itself and write it to file without u having to code?
well, nice idea for research work to make a device that is attached to the brain and it writes the code for everything u think. cool stuff!!! |
________________________________ Jayant Kumar
Member of the 4WebHelp Team
Nibble Guru - Computing Queries Demystified
GZip/ Page Compression Test |
|
|
|
Kdawg
Senior WebHelper
Joined: 21 Apr 2003
Posts: 153
|
Posted:
Tue Apr 29, 2003 10:29 pm (21 years, 1 month ago) |
|
With the rounding is there a way to round to a certain place like .2919 = .292? |
|
|
|
|
SfCommand
Senior WebHelper
Joined: 10 Nov 2002
Posts: 143
Location: UK
|
Posted:
Tue Apr 29, 2003 10:43 pm (21 years, 1 month ago) |
|
|
|
|
Kdawg
Senior WebHelper
Joined: 21 Apr 2003
Posts: 153
|
Posted:
Sat May 03, 2003 3:00 am (21 years, 1 month ago) |
|
how would I format the output of a number, like if it = 0.75 then it outputs .750? |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sat May 03, 2003 7:51 am (21 years, 1 month ago) |
|
|
|
|
jayant
Team Member
Joined: 07 Jan 2002
Posts: 262
Location: New Delhi, India
|
Posted:
Sat May 03, 2003 9:07 am (21 years, 1 month ago) |
|
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.1709 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |