I'm working in PHP and I have an multidimensional array which contains data about user groups, the array is current set out as follows.
$groups = array(
10 => array("name" => "Admin", (etc)),
5 => array("name" => "Standard", (etc))
);
The user will have a group value, which will either be "Admin" or "Standard" but as these values are not the key value in the array, I don't know how I will be able to search for the string value within the child array.
I'm able to change to an integer based level system, but I would prefer to do it this way.
So my question is, how am I able to search a multidimensional array for a value of a subject array without knowing it's key value?