I have this array I want to get the Values “ABC” ,”1″,”2″ and so on respectively and store them in separate variables.
I have used nested foreach but could not get it
array(2) {
[0] => array(3) {
[0] => string(10) "ABC"
[1] => string(1) "1"
[2] => string(2) "2"
} [1] => array(3) {
[0] => string(10) "BCD118"
[1] => string(1) "1"
[2] => string(2) "9"
}
}
Based on your $_SESSION comment to Mike C,
You would need unique keys though or (for instance) ‘BCD118’ and ‘ABC’ would both be key 0 and so ‘ABC’ would be overwritten.
Edit
You could append the
$outer_keyto the inner$keyto get a unique $_SESSION keyThis would produce key/value pairs