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
$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
I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.
I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.