in reply to substring problem???

Hi GrandFather, thanx for the quick reply!
I apologize, but I think I have made a mistake in my question. Forget about the $substring, I just need to print out the last 4 characters of $string, that is NOPQ...
Shall I use -1 in my substr function to start counting backwards?
Thank you!

Replies are listed 'Best First'.
Re^2: substring problem???
by borisz (Canon) on May 28, 2006 at 08:23 UTC
      No need for the 3rd parameter if you need the whole rest of the string. Just
      substr($string, -4)
      will do.