I have a multidimensional array as follows:
$a = array (
#id num name full name
0 => array ( 65, 'name-1', 'Name One' ),
1 => array ( 76, 'name-2', 'Name Two' ),
2 => array ( 82, 'name-3', 'Name Three' )
);
Now, if I want to select 'name-1'
(name) I use $a[0][1]
and to select 'Name Three'
(full name) I use $a[2][2]
.
So, I can select the number, the name or the full name if I have the id in the array.
But what if I have the number or the name and I want to select the full name? how could I get it?
Thanks.