hi all,
i am having a doubt.How can i round off 005 to 5 and 000007 to 7 like this if the user enters in textbox.
please help me..
niths
-1
Posting Whiz in Training
Recommended Answers
Jump to PostCan you not just cast the value to an integer?
(int)000007 = 7
Jump to Postcast your value using (int).
<?php $newvalue=(int)$_REQUEST['userinput']; ?>
All 7 Replies
blocblue
238
Posting Pro in Training
Featured Poster
urtrivedi
276
Nearly a Posting Virtuoso
niths
-1
Posting Whiz in Training
urtrivedi
276
Nearly a Posting Virtuoso
rajarajan2017
niths
-1
Posting Whiz in Training
rajarajan2017
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.