★ wanayoo — archive 1999 http://fr.php.net/manual/nl/function.round.phpNouvelle recherche | Portail wanayoo
PHP Tuesday, March 20, 2001  
downloads | documentation | faq | support | reporting bugs | links 

search for in the  

lookup:
PHP HandleidingPHP Handleiding
Math.Math.
 absabs
 acosacos
 asinasin
 atanatan
 atan2atan2
 base_convertbase_convert
 bindecbindec
 ceilceil
 coscos
 decbindecbin
 dechexdechex
 decoctdecoct
 deg2raddeg2rad
 expexp
 floorfloor
 getrandmaxgetrandmax
 hexdechexdec
 lcg_valuelcg_value
 loglog
 log10log10
 maxmax
 minmin
 mt_randmt_rand
 mt_srandmt_srand
 mt_getrandmaxmt_getrandmax
 number_formatnumber_format
 octdecoctdec
 pipi
 powpow
 rad2degrad2deg
 randrand
 roundround
 sinsin
 sqrtsqrt
 srandsrand
 tantan

previousrand
sinnext

Last updated: Sun, 18 Mar 2001
view this page in English | Brazilian Portuguese | Czech | Dutch | French | German | Hungarian | Italian | Japanese | Korean | Spanish | Plain HTML

round

(PHP 3, PHP 4 )

round -- Rounds a float

Description

double round (double val [, int precision])

Returns the rounded value of val to specified precision (number of digits after the decimal point).


$foo = round (3.4);  // $foo == 3.0
$foo = round (3.5);  // $foo == 4.0
$foo = round (3.6);  // $foo == 4.0

$foo = round (1.95583, 2);  // $foo == 1.96
      

Opmerking: The precision parameter is only available in PHP 4.

See also ceil() and floor().

previousrand
sinnext

Last updated: Sun, 18 Mar 2001
add note | about notes

show source | credits | mirror sites:  

Copyright © 1998-2001 The PHP Group
All rights reserved.
This mirror generously provided by: L'Université Michel de Montaigne Bordeaux III
Last updated: Tue Mar 20 08:02:02 2001 MET