Raised This Month: $ Target: $400
 0% 

check if number is float


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 08-13-2014 , 05:10   Re: check if number is float
Reply With Quote #1

Quote:
Originally Posted by claudiuhks View Post
If number variable is a string, check it using the way below.

PHP Code:
if (contain(number".") != -1)
{
  
// might be float

Note that if the number is 1.000000 then it might also be an integral value (1).
So if you read our messages you will definitely understand.
is_str_float?
Backstabnoob is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-13-2014 , 12:05   Re: check if number is float
Reply With Quote #2

Quote:
Originally Posted by Backstabnoob View Post
is_str_float?
If it existed, it might be relevant .
__________________
fysiks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode