PDA

Click to See Complete Forum and Search --> : [RESOLVED] How to trim string to first 3 characters


I_Love_My_Vans
May 23rd, 2006, 07:44 AM
I have a string which comprises of many caracters, the only data that is useful to me is the first 3 numbers.

How do i trim the string to become only the first 3 characters?

ILMV :D

kfcSmitty
May 23rd, 2006, 08:41 AM
You could use the substr function

IE) $test = substr($string,startchar,length)

http://ca3.php.net/manual/en/function.substr.php


HTH

I_Love_My_Vans
May 23rd, 2006, 10:00 AM
Thank You :D