in reply to substr problem
I think substr is doing exactly what you're asking it to.
You've set the offset to -1. That means, "Start at the last character on the string." From the last character of the string to the last character + $length characters is still only going to return the last character.
What had you hoped to get instead?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: substr problem
by Anonymous Monk on Jul 13, 2002 at 18:19 UTC | |
by TStanley (Canon) on Jul 13, 2002 at 18:28 UTC |