How to pull fax number using adLDAP

I have the code below and for some reason I am unable to pull the fax number. I keep getting Undefined index: fax. i know this is working because I tried sn and it gives me the last name of the user.

$username = $row['login'];
$userinfo = $adldap->user()->info($username, array("*"));
$efax = $userinfo[0]["fax"][0]; 
$telephone = $userinfo[0]["telephone"][0]; 
echo $efax;
echo $telephone;

Open in new window

Who is Participating?
Mike KlineCommented:
maximus81Author Commented:
Got the same error with facsimileTelephoneNumber.
Steven CarnahanNetwork ManagerCommented:
The two available locations for a fax number:


Try all lower case.
maximus81Author Commented:
It was because it wasn't all lowercase. Its working now. Thanks
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.