Page 1 of 1

php to show only first 10 characters of string?

Posted: Mon Feb 26, 2007 11:17 pm
by ianhull
Hi Guys,

how do I get php to show only first 10 characters of string?

Thanks

Posted: Mon Feb 26, 2007 11:30 pm
by Christopher

Code: Select all

$first10 = substr($str, 0, 10);