note 6666 deleted from function.settype by derick
| From: | derick@php.net | Date: | Sun, 09 Feb 2003 16:17:29 +0000 |
| Subject: | note 6666 deleted from function.settype by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-43687@lists.php.net to get a copy of this message | ||
If you settype a double (aka a "real") to an inetger it will truncate the number. I.e.
$some_num=235.68;
settype ($some_num, "integer")
will yield $some_num==235;
This is handy as I haven't been able to find a basic trunc() or truncate() function.