|
floatvalGet float value of a variable Description
float floatval
( mixed
$var
)
Gets the float value of Parameters
Return ValuesThe float value of the given variable. Empty arrays return 0, non-empty arrays return 1. Strings will most likely return 0 although this depends on the leftmost characters of the string. The common rules of float casting apply. Examples
Example #1 floatval Example
<?php
Example #2 floatval non-numeric leftmost characters Example
<?php |