Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php round to the nearest 10

$number = ceil($input / 10) * 10;
Comment

round off to 0.5 php

function roundDown($number, $nearest){
    return $number - fmod($number, $nearest);
}

var_dump(roundDown(7.778, 0.5));
var_dump(roundDown(7.501, 0.5));
var_dump(roundDown(7.49, 0.5));
var_dump(roundDown(7.1, 0.5));
Comment

Round the number in php

<?php
$price =3206250;
$bolish = $price / 1000000;
$natija = ceil($bolish);   // 4

echo  $natija *1000000;
Comment

PREVIOUS NEXT
Code Example
Php :: check current user role 
Php :: what is array_map in php 
Php :: alias to change php version on ubuntu 
Php :: laravel wrong timestamp 
Php :: how-to-generate-an-xlsx-using-php 
Php :: jquery is less than or equal to 
Php :: acf wordpress loop through and display blog posts order by date and type 
Php :: jsondecode php array 
Php :: php key_exists 
Php :: how to create resource controller in laravel 
Php :: wp plugin create 
Php :: Method IlluminateDatabaseEloquentCollection::delete does not exist. 
Php :: saving an image from pc to php 
Php :: middleware command in laravel 
Php :: twig resto 
Php :: Laravel - Send mail using mail class 
Php :: $ is not define 
Php :: sort by number of views descending laravel 
Php :: How do i multiple variables in php 
Php :: php date() 
Php :: eloquent insert into select 
Php :: resource route controller laravel 8 
Php :: replace last two characters string php 
Php :: custom pagination in laravel 
Php :: How to install or setup sanctum for laravel api authentication 
Php :: how to extract data from json in php 
Php :: laravel one command for model table and controller 
Php :: php multi elseif statement ternary 
Php :: namecheap shared cpanel change php version for subdomain 
Php :: theme mod disalow wp 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =