I have a multidimensionnal array
$lstTables = array();
$lstTables[] = array('tablesEGR1',array('1',array('Usa', '9350', '0.01','2015')));
$lstTables[] = array('tablesEGR1',array('1',array('France', '74', '0.01','2015')));
$lstTables[] = array('tablesEGR2',array('1',array('Italy', '74', '0.01','2015')));
Array
(
[0] => Array
(
[0] => tablesEGR1
[1] => Array
(
[0] => 1
[1] => Array
(
[0] => Usa
[1] => 9350
[2] => 0.01
[3] => 2015
)
)
)
[1] => Array
(
[0] => tablesEGR1
[1] => Array
(
[0] => 1
[1] => Array
(
[0] => France
[1] => 74
[2] => 0.01
[3] => 2015
)
)
)....
And what I want is to get some specifics value of the array. Like show me all the values where keys = "tablesEGR1" and "1".
I know its like two loops or more but I really dont know how to do it.
It should be something like
foreach($lstTables as $number_array){
foreach($number_array as $data)
{
print "Array number: $number_array, contains $data. <br>";
}
}
And the last question it is right how I insert the values in the array $lstTables. Is there a better way to store my data.