Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][PHP] Wyciąganie danych z pętli for
alogator
post
Post #1





Grupa: Zarejestrowani
Postów: 158
Pomógł: 0
Dołączył: 13.11.2006
Skąd: Sosnowiec

Ostrzeżenie: (0%)
-----


Witajcie.
Pewnie proste pytanie.
Mam pętle:

for ($i=0; $i<$info["count"]; $i++) {
//Print out the user information here. For those uid, displayname, userprincipalname and emailaddress are those data inside a user profile. It will be different for your LDAP setup.
echo "uid is: " . $info[$i]["uid"][0] . "\n";
echo "displayName entry is: " . $info[$i]["displayname"][0] . "\n<br>";
echo "userPrincipalName entry is: " . $info[$i]["userprincipalname"][0] . "\n<br>";

echo "Object class user:<b> " . $info[$i]["objectclass"][3] . "</b>\n<br>";
echo "Object class computer:<b> " . $info[$i]["objectclass"][4] . "</b>\n<br>";

echo "userPrincipalName entry is: " . $info[$i]["samaccountname"][0] . "\n<br><hr>";
}

i chciałbym aby wyszukał mi np tylko rekordy gdzie echo "uid is: " . $info[$i]["uid"][0] . "\n"; będzie równe np 3.

Proszę o pomoc
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
krowal
post
Post #2





Grupa: Zarejestrowani
Postów: 561
Pomógł: 72
Dołączył: 15.11.2006

Ostrzeżenie: (0%)
-----


Proste pytanie, prosta odpowiedź:
Kod
SELECT * FROM tabela WHERE id = 12


Ten post edytował krowal 8.03.2012, 13:08:03
Go to the top of the page
+Quote Post
alogator
post
Post #3





Grupa: Zarejestrowani
Postów: 158
Pomógł: 0
Dołączył: 13.11.2006
Skąd: Sosnowiec

Ostrzeżenie: (0%)
-----


No to to odnosi się do tabeli.
A ja tu akurat nie mam stricte tabeli tylko jestem podłączony pod Active Directory.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 17:01