View Single Post

  #4 (permalink)  
Old 12-05-2006
Peter
 
Posts: n/a
Default Re: find last part of string

Doing some testing.
A small bug it seems, line 2 should be:

$laststring = substr($mystring, strrpos($mystring, '_') + 1);

>
> $mystring = "abcd_123456_QWER_98765" ;
> $laststring = substr($mystring, strrpos($mystring, '_'));
> $numChars = strlen($laststring);
>
>



Reply With Quote