How to delete the first character in php

hzc
Release: 2023-03-01 16:14:01
Original
2572 people have browsed it

How to delete the first character in php

#How to delete the first character in php?

php uses the substr() function to delete the first character.

substr('string',1);

Delete the last character of the string

substr('string', 0, -1);

Syntax: substr(string,start,length)

Note: If the start parameter is a negative number and length is less than or equal to start, length is 0.

Recommended tutorial: "php tutorial"

The above is the detailed content of How to delete the first character in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!