Date: 04/11/01
- Next message: joey <email protected>: "[PHP-DEV] Bug #10284 Updated: sttchr() function bug"
- Previous message: mfischer <email protected>: "[PHP-DEV] Bug #10291: Calling mysql_error() after mysql_connect() does not return the error"
- In reply to: love_015b <email protected>: "[PHP-DEV] Bug #10284: sttchr() function bug"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
<love_015b <email protected>> wrote in message
news:20010411104033.28175.qmail <email protected>
> From: love_015b <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: php-dev-unsubscribe <email protected>
> For additional commands, e-mail: php-dev-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: joey <email protected>: "[PHP-DEV] Bug #10284 Updated: sttchr() function bug"
- Previous message: mfischer <email protected>: "[PHP-DEV] Bug #10291: Calling mysql_error() after mysql_connect() does not return the error"
- In reply to: love_015b <email protected>: "[PHP-DEV] Bug #10284: sttchr() function bug"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

