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];
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];
If you are echoing the string out, then use:
It's over an order of magnitude faster than:
However, for anything else (eg accessing a database) it can cause problems and should be avoided.
http://php.net/manual/en/function.substr.php
substr ( $string , 1 ,strlen($string) )