コード例 #1
0
ファイル: func.array.php プロジェクト: nicefirework/chess
function arraySumField($array, $key)
{
    return array_sum_field($array, $key);
}
コード例 #2
0
ファイル: game.class.php プロジェクト: benjamw/pharaoh
 /** 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;
 }