Re: Bug #10284: sttchr() function bug

From: Date: Wed, 11 Apr 2001 17:28:59 +0000
Subject: Re: Bug #10284: sttchr() function bug
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-51454@lists.php.net to get a copy of this message
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@hanmail.net> wrote in message news:20010411104033.28175.qmail@php2.chek.com... > From: love_015b@hanmail.net > 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@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.dev (#51454) next »