Reply to Formatting Problem

Your name:

Reply:


Posted by Smiley on 10/14/06 21:58

In a program I'm creating, I'm trying to calculate a percentage. However,
for some reason the calculation is only coming out to 1 decimal place, and I
know there's more. Using this code:

$gshare = $shareresults / $phenresults;
echo "$shareresults / $phenresults = $gshare";

I get the following output:

3,340,000 / 5,180,000 = 0.6

That's wrong. How can I correct this?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация