Float Different Functions In PHP
Sample 1 : Example of Float.
float 3.584
Sample 2 : Different Functions Examples to show Float Values
float 3.684
43.68
3
4
<html>
<head>
<title><?php $pagetitle="Float Different Functions In PHP : 6th Day Lecture : Samee";
echo $pagetitle; ?></title>
<meta name="description" content="<?php $pagetitle ?>" />
<meta name="robots" value="nofollow, noindex" />
<link rel="icon" type="image/ico" href="http://www.iconarchive.com/download/i50954/deleket/3d-cartoon-vol3/Web-Coding.ico" alt="Icon" />
<link type="text/css" href="http://www.getacho.com/download/phpcss/stylesheet.css" rel="stylesheet" />
</head>
<body>
<img id="logo" src="http://icons.iconarchive.com/icons/deleket/3d-cartoon-vol3/256/Web-Coding-icon.png" alt="Coding">
<h1 align="center">Float Diffirent Functions In PHP : <a href="http://sameearticles.blogspot.com" target="_blank">Samee Articles</a></h1>
<h2 align="left">Sample 1 : Example of Float.</h2>
<?php
$float=3.58400;
var_dump($float)
?>
<h2 align="left">Sample 2 : Different Functions Examples to show Float Values</h2>
<?php
$float=3.684000000;
var_dump($float); //It is to show the value is float
echo round($float) . "<br />"; //it is used to increase the value to 4 as mathematics rules.
echo round($float,2) . "<br />"; //it is used to increase the value after point and 2 digit as mathematics rules.
echo floor($float) . "<br />"; //it is used to increase the value according to complete value
echo ceil($float) . "<br />"; //it is used to increase the value to 4 as mathematics rules.
?>
</body>
</html>
Post a Comment
Give your reviews about this blog. Leave your comments. What do you think about this post?
Comments Guidelines:
1) I love to read comments, but please avoid spam.
2) Like this blog, share your insights, and spread the word.
3) You can use basic HTML/xHTML tags.
4) All comments are DoFollow—please use the section professionally.
5) Kindly mention your name or brand below your comment.
6) Constructive suggestions for improvement are always welcome.
Thanks for visiting Samee Articles.
========================================
Best Regards,
Samee U. Feroz