Jump to content

PHP Sum up table - Problem


Ctech

Recommended Posts

Hi,

 

I'm creating a table based on a mySQL query with a few extra custom columns.

The table are displaying average data based on the query in each cell. Something that works fine.

 

My problems is in the sum row. Which is supposed to give the average of the averages of all the data that is used to calculate the averages above.

I have tried various ways to get this done, bt I might be trying it the wrong way. See below for my code.

 

Here are en example of the output of my code.. it is the first tabel that I am having problems with http://www.oddjobs.no/finnkode/finnview.php?Area=Uranienborg+-+Majortstuen&Submit=Velg

 

PHP code is in the pastebin http://pastebin.com/m6f7ac802

 

I hope you understand my code.. and the problem.. and that you have a solution...

 

Thanks

Link to comment
Share on other sites

Sorry guys,

 

Non of your replayes helped in anyway... I guess what I need to do is count each entry in each array in each cell. And tehn add that to a new array for that column. and then do the same for the values.. and then divide them in hte end..

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.