Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

convert float to integer laravel

$floatValue = 4.5;
echo intval($floatValue) //returns 4
  
$floatValue = 4.4;
echo intval($floatValue) //returns 4
  
$floatValue = 4.5;
echo round($floatValue) //returns 5
  
$floatValue = 4.4;
echo round($floatValue) //returns 4
 
PREVIOUS NEXT
Tagged: #convert #float #integer #laravel
ADD COMMENT
Topic
Name
2+8 =