One of my Friend Asked me this small Thing , Here this post is about removing N Number of Characters for Given String Using PHP,
By Using PHP Built in Function Called substr() we can do
substr() : Return Part of A String
Example :
$result = substr($str, 0, -n); // 0 is where you want to start, -n means you want to go backward
$result = substr(‘abcdef’, 0, -3); // $result is ‘abc’
If Like my post Like or Share it Explore it
Thanks !