Ejemplo n.º 1
0
function arraySumField($array, $key)
{
    return array_sum_field($array, $key);
}
Ejemplo n.º 2
0
 /** static public function check_turns
  *		Returns a count of all games
  *		in which it is the user's turn
  *
  * @param int player id
  * @return int number of games with player action
  */
 public static function check_turns($player_id)
 {
     $list = self::get_list($player_id, false);
     $turn_count = array_sum_field($list, 'my_turn');
     return $turn_count;
 }