You are here: Re: newbie questions « PHP Programming Language « IT news, forums, messages
Re: newbie questions

Posted by Geoff Berrow on 11/20/06 21:03

Message-ID: <f_n8h.14866$gl5.4774@tornado.rdc-kc.rr.com> from Auddog
contained the following:

>Is there a way that I can do the count and add together the prices of each
>item numbers? If so where do I place the code for the count and how would I
>get the sum?
>
>I appreciate any input you might be able to give. Thanks.

Initialise an variable $total=0;
Each time round the loop add the current price to the array
$total=$total+$price;

echo out $total at the end

The count is simply the number of rows. Look for a function.



--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

 

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

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