views:

60

answers:

2

Hello,

I know this is simple, and I've done it before, but I've forgotten how to do it.

How might I, in php, subtract the first letter of a string?

For example:

FOOBAR would become OOBAR

I think its something like $string[-1];

Thanks, Christian Stewart

+11  A: 
substr($string, 1)

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

Brad
+1  A: 

substr ( $string , 1 ,strlen($string) )

aadravid
Why the second parameter?... using `substr($string, 1)` will take care of the length..
Garis Suero
you are right... thats why i voted on Brad's answer :)
aadravid