Comparing Values


Posted on 16th Feb 2014 07:03 pm by admin

Hi
I'm reading data from a database and this seems to work OK.

Each system has an associated series of references..
Did you know?Explore Trending and Topic pages for more stories like this.

Code:

Code: $dn = "cn=System";
$filter="(objectclass=*)";
$values = array('cn','telephone','id','intref','dataref','sysref');
$sr=ldap_list($ds, $dn, $filter, $values);
$info = ldap_get_entries($ds, $sr);
for ($n=0; $n<$info['count']; $n++) {
$cn = $info[$n]['cn'][0];
$tele[$cn] = $info[$n]['telephone'][0];
$id[$cn] = $info[$n]['id'][0];
$intref[$cn] = $info[$n]['intref'][0];
$dataref[$cn] = $info[$n]['dataref'][0];
$sysref[$cn] = $info[$n]['sysref'][0];
}

foreach ($tele as $key => $value) {

echo $key . " - Phone: " . $value . " - ID: " . $id[$key] . " - intref: " . $intref[$key] . " - dataref: " . $dataref[$key]. " - sysref: " . $sysref[$key]. "
";

}
What I'm trying to do is
Code:

Code: if id = intref, or id = dataref or id = sysref
then display intref or dataref or sysref in bold.

Obviously I need to check to see if ID from any of the systems match any of the refs.

I think that makes sense !!
No comments posted yet

Your Answer:

Login to answer
67 Like 52 Dislike
Previous forums Next forums
Other forums

using a loop help
Hi guys , i need some help. I have this loop :
while ($row = mysql_fetch_assoc($Result)) { ?&

frame help
on the bottom frame is menu.html

Code: <body><form action='link.php' met

Writing to the middle of a file
Hi I have a bit of a problem. Is there any way i can write some text to a middle of a text file. For

Operating System
How in PHP or other language can I detect Operating system, ie Windows XP Home, Windows 7 Ultimate,

imap: how to save a copy of sent emails to sent elements
Hello my friends,

I am writing an online emailing application with inbox outbox/sent elements

Kill a process
I have a question - how can I kill a process from a command line or by using Oracle SQL Developer? I

data type in column definition
Hi,
I create a table with column called "Direction of Travel code ".
The travel codes in t

A problem with my GD class
Hello,

I created a nice (and simple for now) GD class.
The problem is , it works great on

Find current logon time
Hi,
in my sql script i want to query and find out the logon time of the current session.
<

How to add advertisment on top of videos
Hello,
I was told that i should find the answer for this problem in this forums.
I searched a

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash