Page 1 of 1

Just want the first 10 characters

Posted: Thu May 25, 2006 6:08 pm
by VKX
How would I select only the first ten characers of a string?

Posted: Thu May 25, 2006 6:11 pm
by Burrito
take a look at substr()

Posted: Thu May 25, 2006 6:16 pm
by PrObLeM

Code: Select all

$newString = substr ($str, 0, 10)