Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Convert String to Float in PHP

phpCopy<?php
$mystring = "0.5674";
echo("This float number is of string data type ");
echo($mystring);
echo("
");
$myfloat = number_format($mystring, 4);
echo("Now, this float number is of float data type ");
echo($myfloat);
?>
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #Convert #String #Float #PHP
ADD COMMENT
Topic
Name
8+7 =