You could use the substr function to return a substring starting from the 5th character:

$str = "The quick brown fox jumps over the lazy dog."
$str2 = substr($str, 4); // "quick brown fox jumps over the lazy dog."
Answer from Daniel Vandersluis on Stack Overflow
๐ŸŒ
SitePoint
sitepoint.com โ€บ php
Remove first 2 characters from a string? - PHP - SitePoint Forums | Web Development & Design Community
March 7, 2005 - Ok, I know you can use the substr to only pull some of the characters, but can I strip out only some of the characters, but keep the rest.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ php โ€บ how-to-remove-the-first-character-of-string-in-php
How to remove the first character of string in PHP? - GeeksforGeeks
July 11, 2025 - ... <?php $str = "geeks"; $str1 = substr($str, 1); echo $str1."\n"; $str1 = substr($str, 2); echo $str1; ?> ... Using preg_replace(), you can remove the first character of a string with a regular expression.
Discussions

Remove first 4 characters of a string with PHP - Stack Overflow
How can I remove the first 4 characters of a string using PHP? ... Save this answer. ... Show activity on this post. You could use the substr function to return a substring starting from the 5th character: More on stackoverflow.com
๐ŸŒ stackoverflow.com
Replace first two characters of a string in php - Stack Overflow
2 In PHP Remove several characters from the beginning of a String? 2 Delete first character of string in-place using PHP More on stackoverflow.com
๐ŸŒ stackoverflow.com
Seeking help removing first 2 (or 3) characters from string ... - PHP Coding Help - PHP Freaks
In %3$s below, it is populated with a string that always begins with a number followed by a colon (from 1: to 25:). I see that ltrim removes characters from the beginning of a string but I don't see how to compensate for the extra character in 10: through 25: ... More on forums.phpfreaks.com
๐ŸŒ forums.phpfreaks.com
October 11, 2010
Remove first 2 characters from a string? - #1000 - PHP - SitePoint Forums | Web Development & Design Community
Ok, I know you can use the substr to only pull some of the characters, but can I strip out only some of the characters, but keep the rest. More on sitepoint.com
๐ŸŒ sitepoint.com
0
March 7, 2005
๐ŸŒ
Reactgo
reactgo.com โ€บ home โ€บ how to remove the first n characters of a string in php
How to remove the first n characters of a string in PHP | Reactgo
August 29, 2023 - To remove the first n characters of the string, we can use the built-in substr() function in PHP. The substr() function accepts three arguments, the first one is string, the second is start position, third is length (optional).
๐ŸŒ
Hellonitish
hellonitish.com โ€บ blog โ€บ remove-first-or-last-character-from-a-string-in-php
Hello Nitish โ€ข How Can I Remove the First or Last Character from a String in PHP?
November 4, 2025 - To remove the first character from the beginning of string, set the value of start to 1. To remove the first two characters from the beginning, set the value of start to 2.
๐ŸŒ
PHP Freaks
forums.phpfreaks.com โ€บ php coding โ€บ php coding help
Seeking help removing first 2 (or 3) characters from string ... - PHP Coding Help - PHP Freaks
October 11, 2010 - In %3$s below, it is populated with a string that always begins with a number followed by a colon (from 1: to 25:). I see that ltrim removes characters from the beginning of a string but I don't see how to compensate for the extra character in 10: through 25: ...
Find elsewhere
๐ŸŒ
SitePoint
sitepoint.com โ€บ php
Remove first 2 characters from a string? - #1000 - PHP - SitePoint Forums | Web Development & Design Community
March 7, 2005 - Ok, I know you can use the substr to only pull some of the characters, but can I strip out only some of the characters, but keep the rest.
๐ŸŒ
Tutorialio
tutorialio.com โ€บ remove-first-or-last-character-from-a-string-in-php
How Can I Remove the First or Last Character from a String ...
April 1, 2022 - Get the Full URL or Query String of Current Page in JavaScript ยท How Can I Read a Large File Line by Line in PHP? Read these top five reasons why you should hire me.
๐ŸŒ
PHP
php.net โ€บ manual โ€บ en โ€บ function.substr-replace.php
PHP: substr_replace - Manual
If you would like to remove characters from the start or end of a string, try the substr() function.
๐ŸŒ
PrintMyFonts
askingbox.com โ€บ question โ€บ php-cut-first-x-characters-from-the-beginning-of-string
PHP: Cut first X Characters from the beginning of String
July 13, 2015 - If you ommit the last character (length) when using the function substr(), automatically the substring beginning at the starting position until the end of the string will be returned. ... $s = 'abcdefg'; echo substr($s, 1); // bcdefg echo substr($s, 2); // cdefg echo substr($s, 5); // fg ยท Accordingly, in the first example, the first character from "abcdefg" is removed so that we get "bcdefg".
๐ŸŒ
SitePoint
sitepoint.com โ€บ php
Remove first 2 characters from a string? - #3 by Jhorra - PHP - SitePoint Forums | Web Development & Design Community
March 7, 2005 - That gives me only the second character in the string. Iโ€™m pretty sure substr is really only for if you want some of the characters but not all. I want to remove 2 of the characters.
๐ŸŒ
PrintMyFonts
askingbox.com โ€บ question โ€บ php-cut-first-and-last-character-from-string
PHP: Cut first and last Character from String
You can use the PHP function substr() for cutting off your string at the front and at the back. ... In this example, we are transforming the string "abcde" into "bcd". You can remove the first and the last character by passing 1 as second parameter and -1 as third parameter to substr().
๐ŸŒ
Tutorialdeep
tutorialdeep.com โ€บ knowhow โ€บ php faqs โ€บ how to remove first and last character of string in php
How to Remove First and Last Character of String in PHP
May 13, 2021 - In this tutorial, learn how to remove first and last character of string using PHP. The short answer is to use the substr() and specify the argument as given in
๐ŸŒ
Python Examples
pythonexamples.org โ€บ php โ€บ how-to-remove-first-n-characters-in-string
How to Remove first N Characters in a String in PHP
We use the substr function starting from index 3 to remove the first 3 characters. Finally, we print the modified string. <?php $str1 = 'Hello World'; $result = substr($str1, 3); echo 'Modified string is: ' . $result; ?> ... We declare a string named $str2 with a value of "apple".