Hi Todd!
if $a = 3.5 then
echo (int)$a // print 3
regards
Marcelo Gulin
Todd Cary escribió:
>
> What is the syntax for dividing 7 by 2 and getting 3; not 3.5?
>
> Todd
>
> --
> Todd Cary
> Ariste Software
> [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> What is the syntax for dividing 7 by 2 and getting 3; not 3.5?
you can use:
$intVar = ((int)( 7 / 2 ));
Chris
What is the syntax for dividing 7 by 2 and getting 3; not 3.5?
Todd
--
Todd Cary
Ariste Software
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators
3 matches
Mail list logo