Adam Williams wrote:
I'm querying data and have results such as a variable named $entries[$i]["dn"]:

CN=NTPRTPS3-LANIER-LD335c-LH107-PPRNP9A92,OU=XXXXXXXXXXf,OU=XXXXXXXXXX,OU=XXXXXXXXXXXXX,DC=xxxxxxxx,DC=xxxxxxxxxx,DC=xxx

Basically I need to strip off the first command everything after, so that I just have it display CN=NTPRTPS3-LANIER-LD335c-LH107-PPRNP9A92.

I tried echo rtrim($entries[$i]["dn"],","); but that doesn't do anything. Any ideas?

<?php

preg_replace( '#,.*$#', '', $entries[$i]['dn'] );

?>

Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to