How to associate array with different keys and with same values

Wednesday, November 4, 2015

1 - I need to combine arrays per region and display all the differents fields. If the field repeat just addition because it's some values.



2 - I need to combine array per region and where table = tableFailed if exist or not.



For example :



Array
(
[0] => Array
(
[region] => azerty FCLI
[totalAttemps] => 4
[totalSuccess] => 4
[totalFailed] => 0
[table] => test_678903_FCLI
)

[1] => Array
(
[region] => qwerty FCLI
[totalAttemps] => 1
[totalSuccess] => 1
[totalFailed] => 0
[table] => test_693314_FCLI
)

[2] => Array
(
[region] => qwertz FCLI
[totalAttemps] => 1
[totalSuccess] => 1
[totalFailed] => 0
[table] => test_693314_FCLI
)

[3] => Array
(
[region] => qwertz FCLI
[totalAttempsFailed] => 11
[ituCountFailed] => 11
[tableFailed] => test_693314_FCLI
)

[4] => Array
(
[region] => azerty FCLI
[totalAttempsFailed] => 11
[ituCountFailed] => 11
[tableFailed] => test_693314_FCLI
)

[5] => Array
(
[region] => qwerty FCLI
[totalAttempsFailed] => 11
[ituCountFailed] => 11
[tableFailed] => test_693314_FCLI
)

0 comments:

Post a Comment