I need to delete the first 3 letters of a string and the last 3 letters of a string. I know I can use substr() to start at a certain character but if I need to strip both fi
Use
substr($var,1,-1)
this will always get first and last without having to use strlen.
Example:
Output:
a,b,d,e,f