I have this array (i can't change it) :
array(3) {
[0]=>
array(8) {
["kampania"]=> string(6) "dasdas"
[0]=> string(6) "dasdas"
["300x250"]=> int(1)
[1]=> int(1)
["160x600"]=> int(2)
[2]=> int(2)
["728x90"]=> int(3)
[3]=> int(3)
}
[1]=>
array(8) {
["kampania"]=> string(12) "aaaaaaaaaaaa"
[0]=> string(12) "aaaaaaaaaaaa"
["300x250"]=> int(4)
[1]=> int(4)
["160x600"]=> int(5)
[2]=> int(5)
["728x90"]=> int(6)
[3]=> int(6)
}
[2]=>
array(8) {
["kampania"]=> string(20) "AAAAAAAAAAAAAAAAAAAA"
[0]=> string(20) "AAAAAAAAAAAAAAAAAAAA"
["300x250"]=> int(7)
[1]=> int(7)
["160x600"]=> int(8)
[2]=> int(8)
["728x90"]=> int(9)
[3]=> int(9)
}
}
As you can see, I got repeated values, because the array as the defined key and then an integer key.
How can I create a function which will remove the integer key and value from array and return a new array already "clean"
the result expect should be like this:
array(3) {
[0]=>
array(8) {
["kampania"]=> string(6) "dasdas"
["300x250"]=> int(1)
["160x600"]=> int(2)
["728x90"]=> int(3)
}
[1]=>
array(8) {
["kampania"]=> string(12) "aaaaaaaaaaaa"
["300x250"]=> int(4)
["160x600"]=> int(5)
["728x90"]=> int(6)
}
[2]=>
array(8) {
["kampania"]=> string(20) "AAAAAAAAAAAAAAAAAAAA"
["300x250"]=> int(7)
["160x600"]=> int(8)
["728x90"]=> int(9)
}
}
Thanks Guys! I'm really sorry for ask it , but I loose already so much time trying to fix it by myself