<?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); ?>