Hi.
I made a poor job of explaining my last post, which caused some frustration, so this time I will try to explain a bit better - and hopefully get a better result... Here goes...
I have 2 arrays, called $old_teams1 and $old_teams2.... $old_teams1 represents side 1 of the fixtures, and $old_teams2 represents side 2 of the fixtures... Both these arrays may vary in size depending on how many fixtures/teams there are.... This table represents the 2 arrays:
Fixture$old_team1$old_team2
134
241
332
442
513
621
With less or more teams, there would be more or less fixtures.. In the above table, there are 4 teams... So the 2 end colomns, represent the arrays...
The numbers (with 4 teams) as above, vary from obviously 1-4... and with more teams, a bigger range. However these numbers are not the actual team ID numbers, as defined in the MySQL database. If the team ID numbers defined in the database, are stored in the array, called $teams_arr for example... The actual numbers of the teams, in the database may vary depending.. but for now... lets say $teams_arr is the following:
$teams_arr
= Array (
[0] => 3
[1] => 5
[2] => 6
[3] => 8 )
How do I go about substituting all instances, of 1's for 3's, 2's for 5's, 3's for 6's and 4's for 8's, .... I need to convert the existing values as stored in $old_teams1 and $old_teams2, into the new $teams_arr values...
I hope you understand what I'm getting at...