I need to scan the first array
and store the value and amount of that value in another array
. I'm not getting it because I'm having difficulty storing the values in another array
.
Array :
array(5) {
[0]=>
array(1) {
[0]=>
string(2) "12"
}
[1]=>
array(1) {
[0]=>
string(2) "13"
}
[2]=>
array(1) {
[0]=>
string(3) "100"
}
[3]=>
array(1) {
[0]=>
string(3) "12"
}
[4]=>
array(1) {
[0]=>
string(3) "13"
}
}
Array with the value and quantity I need:
array(3) {
[0]=>
array(1) {
[0]=>
string(2) "12"
int() "2"
}
[1]=>
array(1) {
[0]=>
string(2) "13"
int() "2"
}
[2]=>
array(1) {
[0]=>
string(3) "100"
int() "1"
}
}