Re: find last part of string
On 6 Dec 2006 09:51:47 -0800, "ZeldorBlat" <zeldorblat@gmail.com>
wrote:
>
>Peter wrote:
>> 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);
>> >
>> >
>
>If I just gave you the code and it worked perfectly, you'd have no
>reason to look at it and try to understand how it works :)
That's just plain silly. If he examines it and understands how it
works, he may be able to progress.
|