You are here: Re: sums, averages stuff help « PHP Programming Language « IT news, forums, messages
Re: sums, averages stuff help

Posted by Brendan Gillatt on 10/24/07 20:05

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

someusernamehere wrote:
> Hey people, I need to do some sistem in PHP and MySQL, I have do it a
> part but the other is the problem, basically is mathemetical
> operations, te user register something and after insert some registry
> and after is needed obtain sums, averages and something similar, does
> anyone have some code similar for read about??
>
> kisses, Elena
>

foreach ( $list_of_values as $value ) {
$total += $value;
}

$mean = $total / count ( $list_of_values );

- --
Brendan Gillatt
brendan {at} brendangillatt {dot} co {dot} uk
http://www.brendangillatt.co.uk
PGP Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xBACD7433
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)

iD8DBQFHH6WCkA9dCbrNdDMRAnXVAKDcLxUEJfvOXPGRIKzLvc+oV2eVTQCgj7pd
xEiAKAtc4enMbWz8pl/OO4s=
=LkQ1
-----END PGP SIGNATURE-----

 

Navigation:

[Reply to this 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

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