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 = (float) $mystring;
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+5 =