Answers for "php remove characters from end of string"

PHP
2

php substr remove last 4 characters

echo substr($string, 0, -3);
Posted by: Guest on October-24-2020
0

remove one character from string php

<?php
    $str = "geeks";
    $str1 = substr($str, 1);
    echo $str1."\n";
    $str1 = substr($str, 2);
    echo $str1; 
?>
Posted by: Guest on October-14-2021

Code answers related to "php remove characters from end of string"

Browse Popular Code Answers by Language