Kmspico Download | Official KMS Activator Website [New Version 2024] Fast and Easy Converter YouTube to MP3 Online KMSAuto Net Activator Download 2024 Immediate Byte Pro Neoprofit AI Blacksprut without borders. Discover new shopping opportunities here where each link is an entrance to a world ruled by anonymity and freedom.

How to Remove Last Two Characters from String in PHP?

Hello Friends Today, through this tutorial, I will tell you how to Remove Last Two Characters from String with the help of php.

<?php
$string = "abcdefgh";
echo substr($string, 0, -2);
?>

As you have been told by the example above. If you want to run this code on the server, then you will first have to create a php file. And then add the above code to the php file. Then go to your server and run your file.

<?php 
$two_string = "zyxwvu"; 
echo substr($two_string, 0, -2); 
?>