Thread: PHP calculation
View Single Post

  #3 (permalink)  
Old 05-07-2008
chrisv
 
Posts: n/a
Default Re: PHP calculation

On May 6, 9:50 pm, Erwin Moller <hi.steven...@gmail.com> wrote:
> Below is my PHP code:
>
> <html>
> <head>
> <title>Example</title>
> </head>
> <body>
>
> <?php
>
> $str="This is a sentence";
> $number=(9.94+0.6)/10;
> echo "Hello, youtube $number";
> ?>
>
> </body>
> </html>
>
> After I run this program, I get a result
>
> Hello, youtube 1.054
>
> Why is it 1.054 rather than 1?
> Please give me some help.
>
> Best Regards
> Erwin Moller


(9.94+0.6)/10;

= 10.54/10
= 1.054

i don't think php is the problem

Reply With Quote