In this article, we will learn how to remove the first character of a string in PHP.  Using substr() PHP function, it takes two parameters first is a string and second is an index position.


Example

<?php

$str = "PHP Tutorial";
$after_string = substr($str, 1);
echo $after_string;

?>

Output:

HP Tutorial



Are you facing problems in understanding this article?
You can watch the video. Watch it now