ats2012
asked on
Issues displaying Multidimensional Array using php and ADldap plugin
I am pulling member data out of a Active directory group using
I would like to display the count but am having issues echoing the data. Below is what the array looks like. How would the echo code look like. Been working on this and can' figure it out.
$groupinfo = $adldap->group()->info('group', array('member'));
I would like to display the count but am having issues echoing the data. Below is what the array looks like. How would the echo code look like. Been working on this and can' figure it out.
Array
(
[0] => 1
[1] => Array
(
[member] => Array
(
[count] => 23
[0] => Data
[1] => Data
[2] => Data
[3] => Data
[4] => Data
[5] => Data
[6] => Data
[7] => Data
[8] => Data
[9] => Data
[10] => Data
[11] => Data
[12] => Data
[13] => Data
[14] => Data
[15] => Data
[16] => Data
[17] => Data
[18] => Data
[19] => Data
[20] => Data
[21] =>Data
[22] => Data
)
[0] => member
[count] => 1
[dn] => Data
)
)
echo $groupinfo[1]["member"]["c ount"];
ASKER
I tried that combination and this is the error I receive
SCREAM: Error suppression ignored for
( ! ) Notice: Undefined offset: 1 in E:\wamp\www\ats\citrix_xenapp.php on line 36
Call Stack
# Time Memory Function Location
1 0.0004 146088 {main}( ) ..\citrix_xenapp.php:0
:
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The Array is being printing using print_r so this is correct but it still spits out that error. I don't get it.
ASKER
This is only looking at one group.
ASKER
Interesting if I use:
echo $groupinfo[0]["member"]["c ount"];
This is the output:
23Array
echo $groupinfo[0]["member"]["c
This is the output:
23Array
ASKER
I got this working now. Its a 0 instead of 1. Not sure why.