Takes a number like 1000.000001 and rounds it to 1001, or 1000.9 and rounds it to 1001 I made this for my paginator which gets the total pages then divides by amount per page, sometimes it returns 1.1 or 1.00001 etc, so it rounds it up for a solid number to use for the paginator
Download
View Source (print view)
Rating : 4.7
Views : 1228
Heres a nice function I made for my pagination that rounds to the next number if the number is greater than the whole number.
EX: 2.000001 will return 3
2.5 will return 3
2 will return 2
1.9 or 1.3 etc will return 2
Can use it as long as copyright remains intact.
<?php
function round_up($Number) {
// Copyright Josh Acecool M http://www.acecoolco.com
if ($Number > number_format($Number, "0")) {
$Number = round($Number);
$Number++;
}
else
{
$Number = number_format($Number, "0");
}
return $Number;
}
?>
php script and char(124) (select cast(count(1) as varchar(8000)) char(124) from [sysobjects] where 1=1)>0, soltan_kharabat, php_snips, yahoo_status, logo script and 0=1 union select, 'php_keyword, roman, zend, ringtonescript, im neuen fenster, test_"_onmouseover="alert(1)", user, form, image uploader, bandwidth tester, hack wifi pasword, html text editor, doc, pdf, rtf, xsl files to a single pdf at runtime in php, files, read mysql field, paper_without_wood