Stut wrote:
Jay Blanchard wrote:

0-8 is nine characters, which is two less than eleven, IIRC


So the length should be 9 not 8 no? Or should I go back to school?


Forgive us, it's Monday.

$newstring = substr ( $oldstring, 0, 9 );

Will knock the last two characters off of an eleven character string. 0 is the starting point, and 9 is the length you want returned....

$newstring = substr ( $oldstring, 1, 9 );

Will knock off the first and last character of an eleven character string (giving you the 'middle' 9 characters).

$newstring = substr ( $oldstring, 0, -2 );

Will knock the last two characters off a string of any length.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to