* Octavian Rasnita <[EMAIL PROTECTED]>:
> I get some values from a MySQL table and some of them are in the format
> 1000.0, 234.0, etc.
>
> I want those values converted as 1000, 234, and so on, but the other string
> values need to remain the same.
>
> I have tried using the function is_numeric to test which of the values
> returned from MySQL are numbers, but none of them appear to be a number, so
> I cannot convert them.

Use intval($value) to get the integer value.

-- 
Matthew Weier O'Phinney           | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist       | http://www.garden.org
National Gardening Association    | http://www.kidsgardening.com
802-863-5251 x156                 | http://nationalgardenmonth.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to