View Single Post
  #2  
Old 12-07-2005, 07:00 AM
jami jami is offline
OSP Starters
 
Join Date: Dec 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jami is on a distinguished road
Default PHP Code

The following is the solution for it:

PHP Code
while($row = mysql_fetch_array($result)){
$vals[$row['column_something']] = $row['count'];
}

foreach($vals as $var => $val)
{
echo $var.' => '.$val.'<br>';
} -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - Counting Values in Array
View Single Post
  #2  
Old 12-07-2005, 07:00 AM
jami jami is offline
OSP Starters
 
Join Date: Dec 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jami is on a distinguished road
Default PHP Code

The following is the solution for it:

PHP Code
while($row = mysql_fetch_array($result)){
$vals[$row['column_something']] = $row['count'];
}

foreach($vals as $var => $val)
{
echo $var.' => '.$val.'<br>';
} -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote