So what is the function to display floating number | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

So what is the function to display floating number

<?php $x= 5.67; if ($x<0) echo "$x is a negative number"; elseif ($x>0) echo "$x is a positive number"; elseif ($x%2==1) echo "$x is a floating number"; else echo "$x is a string"; ?>

13th May 2019, 10:34 AM
🇧🇩BASHAR
🇧🇩BASHAR - avatar
1 Answer
+ 2
elseif (is_float($x))
13th May 2019, 11:01 AM
Prokopios Poulimenos
Prokopios Poulimenos - avatar