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

Inter Company -- Resources Related Billing (Services Industry)
Hello,

My company has a scenario where:
Company A bills Company C for INTER (cross

PEAR in appliactiond development
When I was picking up PHP I went from procedural programming, fairly quickly into OOP, then after wr

$_POST variable un-useable
I'm trying to use a $_POST variable in a mysql update statement but i can't use it for some unknown

Warning: mysql_num_rows() expects parameter 1
When i add quote at the end of this link
example:http://localhost/articlemania/category.php?cid=3

Disable html within defined tags
I have a mysql database that allows users to enter content with html, but I also want to have a tag

ok i need to join all this pages to make 1 neat code
i have 5 pages that make up my tv guide it works 100% but i want to make it 1 page if i can or 2, i

printing links
Hi every1

i am connecting to a table in sql and the looping through with a while ($ var = my

onClick='location.href=index.htm'> not working
Below is my code:

echo "<input type='button' value='redirect' onClick='location.h

isset undefined variable
Hi all,

Hope someone can point out the obvious. I've a log in script, if you dont enter a use

show the direct link into href
I want to display link on the page. i am fetching the data(URL) from database,actually before that i

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