substring) that appear to be identical at first glance; they both return a substring from a given string. So what's the difference? Their second parameters, while both numbers, are expecting two different things.
substring the second parameter is the first index not to include:
substr the second parameter is the number of characters to include in the substring:
For more information on string functions, checkout Quirksmode's guide.