This is the documented behavior of strrchr();
It searches for the last occurence of a CHARACTER, not a string.

There does not appear to be function to search for the last occurence of a
string.  Perhaps a feature request would be more appropriate.

In the mean time perhaps reversing both strings with strrev() will suffice.

-Joe
<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> From:             [EMAIL PROTECTED]
> Operating system: linux(redhat6.2)
> PHP version:      4.0.4pl1
> PHP Bug Type:     Unknown/Other Function
> Bug description:  sttchr() function bug
>
> <?
> $k="%C5%DA%B7%B9%C5%E4%BA%F1%C5%DA%B7%B9%C5%E4%BA%F1";
> $q="%C5%DA";
> $b=strrchr($k,$q);
> echo $k."<br>";
> echo $q."<br>";
> echo $b;
> ?>
> ///////result//////////
> %C5%DA%B7%B9%C5%E4%BA%F1%C5%DA%B7%B9%C5%E4%BA%F1
> %C5%DA
> %F1
>
> I want this result,"%C5%DA%B7%B9%C5%E4%BA%F1"
> Maybe it is function's bug.
>
>
>
> --
> Edit Bug report at: http://bugs.php.net/?id=10284&edit=1
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to