Skip to content

Commit

Permalink
fixed an empty array error
Browse files Browse the repository at this point in the history
  • Loading branch information
seantomburke committed Feb 7, 2014
1 parent 6c0891d commit e2ce241
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions statistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@
<span class="left">User</span>
<span class="right">Number of Events</span>
</div>';

foreach($page->DB->resultToArray() as $key => $value)
if(is_array($page->DB->resultToArray() ))
{
$top_participants .= '<div class="row">
<font color="#003333">
<span class="left">'.$value[0].'</span>
<span class="right">'.$value[1].'</span>
</font><br>
</div>';
foreach($page->DB->resultToArray() as $key => $value)
{
$top_participants .= '<div class="row">
<font color="#003333">
<span class="left">'.$value[0].'</span>
<span class="right">'.$value[1].'</span>
</font><br>
</div>';
}
}

$top_participants .= " </div>
Expand Down

0 comments on commit e2ce241

Please sign in to comment.