php get array values as new variable for ldap
suppose I got an array like this:
array ([0] => array([0]=>dog [1]=>cat))
How am I able to get just only "dog" and "cat" to store them in variables? I would like to use them for a further search. Like okay I find one array animals with these values, take each value to find arrays which describes the dog and cat races.
my try failed:
echo '<pre>';
foreach($result as $animals){
for($i=0;i<$animals;i++){
$find = animals[i];
$filter = "(objectClass=*)";
$show = array("race","subrace");
$animalSearch = ldap_search($ds, $find, $filter, $show) or die "...";
$animalInfos = ldap_get_entries($ds,$animalSearch) or die"shit";
print_r($animalInfos);
}
Answer
Solution:
as waterloomatt said, accessing multi arrays are the key and i think i pretended his suggestions wrong. finally i got a solution: