Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php round function Passing parameters with mode.

<?php
// round to nearest even value
echo(round(10.5,0,PHP_ROUND_HALF_EVEN));
echo "<br>";
 
// round to nearest odd value
echo(round(10.5,0,PHP_ROUND_HALF_ODD));
echo "<br>";
 
// round towards zero
echo(round(10.5,0,PHP_ROUND_HALF_DOWN));
echo "<br>";
 
// round away from zero
echo(round(10.5,0,PHP_ROUND_HALF_UP));
?>
Comment

PREVIOUS NEXT
Code Example
Php :: silverstripe image upload field 
Php :: like button phpAdd Answer 
Php :: php return associative array 
Php :: curl_setopt_array php 
Php :: stripe php sdk constants 
Php :: php encrypt password 
Php :: laravel auth sha-1 
Php :: laravel FacadesDB update 
Php :: laravel_login1 
Php :: doble quotes in csv export php 
Php :: how to remove third brackets from encoded json array in php 
Php :: woocommerce php reset password length 
Php :: laravel digits between does not working 
Php :: php remove duplicates from string 
Php :: convert_uuencode (PHP 5, PHP 7, PHP 8) convert_uuencode — Uuencode a string 
Php :: Laravel save without an event 
Php :: laravel validation two columns unique 
Php :: php split 
Php :: check date is in the last 24 hours? 
Php :: laravel model create get id 
Php :: laravel reroute 419 
Php :: php update sql database from form 
Php :: redirect to intent url after login laravel 
Php :: laravel where condition with if 
Php :: Laravel Google Line Chart 
Php :: laravel route group 
Php :: can i back up mysql database from php code? 
Php :: php header author 
Php :: twig render to string 
Php :: Laravel unique cheque using multiple column 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =