Page 1 of 1

Cut String from the end after certain number of characters

Posted: Mon Aug 11, 2014 11:40 pm
by donny
hello

can somebody tell me how to use the substr() command so if i have a string like this

$alphabet = abcdefghijklmnopqrstuvwxyz

i want the max length of the string to be 15 characters and i want it to cut off after the 15th character

so $alphabet would become abcdefghijklmno

thank you

Re: Cut String from the end after certain number of characte

Posted: Mon Aug 11, 2014 11:47 pm
by donny
i got it . thanks a lot

Re: Cut String from the end after certain number of characte

Posted: Thu Aug 14, 2014 10:06 am
by kladrian
hi,
I know the answer but it would be nice to write the solution not just "i got it" for other people

thanks a lot :D