Jump to content

[SOLVED] Summarising array contents


padams

Recommended Posts

Is it possible to take an associative array and summarise its contents? I have an associative array where each row has an integer playerID field, and a few other fields. What I would like to do is count up how many rows there are for each playerID, and then display that information in a table. I've no idea if it's even possible, and if so, no idea where to start!

 

The query looks like this:

 

$tries_sql = "SELECT * FROM tries";

$tries_query = mysql_query($tries_sql) or die(mysql_error());

$rsTries = mysql_fetch_assoc($tries_query);

Link to comment
https://forums.phpfreaks.com/topic/70127-solved-summarising-array-contents/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.