Page 1 of 1

Get just 2 characters

Posted: Sat Oct 30, 2010 1:28 pm
by gotornot
Hi
What code would i use to take the first 2 letters of a post code so for example
CM11 2AY
I want the CM bit what command would strip the first 2 characters out?

Thanks

Re: Get just 2 characters

Posted: Sat Oct 30, 2010 2:01 pm
by gotornot
thanks very much people i worked it out in the end but really good thanks.
Whatis the best command for srtipping out the numbers if any are included?

Re: Get just 2 characters

Posted: Sat Oct 30, 2010 3:44 pm
by califdon
These are things you can easily learn about from the PHP manual or references like this:
http://www.w3schools.com/php/php_ref_string.asp