late night coding rules! (about strings)
Posted: Fri May 09, 2003 3:05 am
</sarcasm>
i need some n00bish help...ugh
I have a two part string.
I have an easy way to get everything before the seperator which in my case is a space. I used the strtok() function.
It worked great.
My only issue is, i have no way to get the last part of the two part string without including the first part.
example: $string = "blablablablabla heheheheehhe";
if i use the seperator " ", i get blablablablabla fine, but heheheheehhe is unaccessable alone.
The book i used to get the hang of this all didn't explain one bit how to get that last part. I can't use substr() since it requires exact string length and the first and last strings are both not always the same length.
I'm wondering if there is some easy way to do this that i have not found yet.
i need some n00bish help...ugh
I have a two part string.
I have an easy way to get everything before the seperator which in my case is a space. I used the strtok() function.
It worked great.
My only issue is, i have no way to get the last part of the two part string without including the first part.
example: $string = "blablablablabla heheheheehhe";
if i use the seperator " ", i get blablablablabla fine, but heheheheehhe is unaccessable alone.
The book i used to get the hang of this all didn't explain one bit how to get that last part. I can't use substr() since it requires exact string length and the first and last strings are both not always the same length.
I'm wondering if there is some easy way to do this that i have not found yet.