PHP type cast float to int

  Description

 int intval ( mixed $var [, int $base = 10 ] )

 Parameters Description

 $var : The value which converted to an integer

 $base : Conversion base

 Examples

 <?phpecho intval(42);           // 42echo intval(4.2);           // 4echo intval('42');          // 42

Nikunj K

Phasellus facilisis convallis metus, ut imperdiet augue auctor nec. Duis at velit id augue lobortis porta. Sed varius, enim accumsan aliquam tincidunt, tortor urna vulputate quam, eget finibus urna est in augue.