note 82555 added to function.round
| From: | ThOmAs at osu1 dot php dot net | Date: | Wed, 16 Apr 2008 11:32:05 +0000 |
| Subject: | note 82555 added to function.round | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-138366@lists.php.net to get a copy of this message | ||
Excample :
<?php
function if_this_an_int($arg)
{
if(strlen($arg) > 0 && is_numeric($arg) && $arg > 0)
{
echo round($arg);
}
}
$test = 1.3;
echo if_this_an_int($test);
?>
You can use this function for any formular in your website, when you must to check if not empty or
zero and it's a number
I hope you can need this.
----
Server IP: 194.153.94.10
Probable Submitter: 89.217.148.179
----
Manual Page -- http://www.php.net/manual/en/function.round.php
Edit -- https://master.php.net/note/edit/82555
Del: integrated -- https://master.php.net/note/delete/82555/integrated
Del: useless -- https://master.php.net/note/delete/82555/useless
Del: bad code -- https://master.php.net/note/delete/82555/bad+code
Del: spam -- https://master.php.net/note/delete/82555/spam
Del: non-english -- https://master.php.net/note/delete/82555/non-english
Del: in docs -- https://master.php.net/note/delete/82555/in+docs
Del: other reasons-- https://master.php.net/note/delete/82555
Reject -- https://master.php.net/note/reject/82555
Search -- https://master.php.net/manage/user-notes.php