Re: stripping first comma off and everything after
| From: | Jo�o C�ndido de Souza Neto | Date: | Fri, 18 Jun 2010 20:06:04 +0000 |
| Subject: | Re: stripping first comma off and everything after | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-306248@lists.php.net to get a copy of this message | ||
Why not this?
$var = explode(",",$entries[$i]["dn"]);
$var = $var[0];
"Adam Williams" <adam_williams@bellsouth.net> escreveu na mensagem
news:4C1BCF62.5070804@bellsouth.net...
> 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?
>