How can I trim 5 characters from a string from left and right side. e.g.
4k2l3k4jc9l3kancie9
What should be trimmed and kept are:
4k2l3 k4jc9l3ka ncie9
^ ^ ^
remove keep remove
$string = substr($string, 5, -5);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With