PHP calculation

This is a discussion on PHP calculation within the PHP Language forums, part of the PHP Programming Forums category; Below is my PHP code: <html> <head> <title>Example</title> </head&...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-07-2008
Erwin Moller
 
Posts: n/a
Default PHP calculation

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
Reply With Quote
  #2 (permalink)  
Old 05-07-2008
Jerry Stuckle
 
Posts: n/a
Default Re: PHP calculation

Erwin Moller 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
>


Because you're screwed up.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Reply With Quote
  #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
  #4 (permalink)  
Old 05-07-2008
Jerry Stuckle
 
Posts: n/a
Default Re: PHP calculation

chrisv wrote:
> 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
>
>


He's a troll using Erwin's good name.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Reply With Quote
  #5 (permalink)  
Old 05-07-2008
Peter H. Coffin
 
Posts: n/a
Default Re: PHP calculation

On Tue, 06 May 2008 22:54:51 -0400, Jerry Stuckle wrote:
> Erwin Moller 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
>>

>
> Because you're screwed up.


And hasn't sorted out basic arithmetic...

--
"The bullets are just his way of saying 'Keep it down, I've got a
hangover.'"
Kiki to Dr. Schlock, as seen in http://pics.sluggy.com/comics/000108a.gif
Reply With Quote
  #6 (permalink)  
Old 05-07-2008
Erwin Moller
 
Posts: n/a
Default Re: PHP calculation

Erwin Moller schreef:
> 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


Dear Erwin imposter,

You still do it the wrong way!
Pay some attention please.
If you want to mimic me the right way, end your silly postings with this:

Quote:
Regards,
Erwin Moller
Not 'Best Regards'!

Also change your emailadres to the one I use here.
So do not use hi.steven.tu@gmail.com.

In that way you can maybe fool a few people in here who don't know how
to do any futher checks (or don't care to do more checks).

Jeez, how hard can it be?
You must be very new at this.

Regards,
Erwin Moller
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:15 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0