Use this,
<?php
$arr = Array
(
'homeclub' => Array
(
0 => 'MAGA',
1 => 'AGUI',
2 => 'BRAV',
3 => 'TIBU',
),
'homeclub_annotation' => Array
(
0 => 3,
1 => 11,
2 => 0,
3 => 8,
),
'game_inning' => Array
(
0 => '9 inn',
1 => '10 inn',
2 => '1 inn',
3 => '10 inn',
),
'visitor' => Array
(
0 => 'CARI',
1 => 'LEON',
2 => 'TIGR',
3 => 'CARD',
),
'visitor_annotation' => Array
(
0 => 2,
1 => 10,
2 => 12,
3 => 10,
),
'status' => Array
(
0 => 'FIN',
1 => 'FIN',
2 => 'SUSP',
3 => 'FIN',
)
);
for($int = 0; $int < count($arr['homeclub']); $int++){
$query = 'INSERT INTO tbl_games (teamA, teamA_annotation, teamB, teamB_annotation, game_date, game_status, game_time, game_place) VALUES(';
foreach($arr AS $key => $val){
$query .= (is_integer($val[$int])) ? $val[$int] . ', ' : '\'' . stripslashes($val[$int]) . '\', ';
}
$query .= 'NOW(), NULL, NULL);';
echo $query; // Complete query string, run this with your chosen DB handler.
}
?>
Leaving the above echo in place, you will get the following...
INSERT INTO tbl_games (teamA, teamA_annotation, teamB,
teamB_annotation, game_date, game_status, game_time, game_place)
VALUES('MAGA', 3, '9 inn', 'CARI', 2, 'FIN', NOW(), NULL, NULL);
INSERT INTO tbl_games (teamA, teamA_annotation, teamB,
teamB_annotation, game_date, game_status, game_time, game_place)
VALUES('AGUI', 11, '10 inn', 'LEON', 10, 'FIN', NOW(), NULL, NULL);
INSERT INTO tbl_games (teamA, teamA_annotation, teamB,
teamB_annotation, game_date, game_status, game_time, game_place)
VALUES('BRAV', 0, '1 inn', 'TIGR', 12, 'SUSP', NOW(), NULL, NULL);
INSERT INTO tbl_games (teamA, teamA_annotation, teamB,
teamB_annotation, game_date, game_status, game_time, game_place)
VALUES('TIBU', 8, '10 inn', 'CARD', 10, 'FIN', NOW(), NULL, NULL);