floatval

(PHP 4 >= 4.2.0, PHP 5)

floatval -- Get float value of a variable

Beschreibung

float floatval ( mixed var )

Gets the float value of var.

Parameter Liste

var

May be any scalar type. You cannot use floatval() on arrays or objects.

Rückgabewerte

The float value of the given variable.

Beispiele

Beispiel 1. floatval() Example

<?php
$var
= '122.34343The';
$float_value_of_var = floatval($var);
echo
$float_value_of_var; // 122.34343
?>

Siehe auch

intval()
strval()
settype()
Type juggling

Hosting by: Hurra Communications GmbH
Generated: 2007-01-26 17:57:00