Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 웹하드추천
- OOP
- file-upload
- 경영
- variables
- HTML
- Regex
- 무료다운로드쿠폰
- php
- function
- date
- Linux
- Session
- UTF-8
- MySQL
- JavaScript
- Ajax
- curl
- 웹하드순위
- post
- composer-php
- string
- Apache
- JSON
- Laravel
- 전략
- Forms
- Arrays
- jquery
Archives
- Today
- Total
개발! 딱 깔끔하고 센스있게!
php 에서 문자열 끝의 세 글자를 어떻게 삭제합니까? 본문
php 에서 문자열 끝의 세 글자를 어떻게 삭제합니까?"abcabc abcabcab"가 "abcabc"!
대답
하면:
echo substr($string, 0, -3);
Substr 문서에서 말한 것처럼 strlin을 사용할 필요가 없습니다:
If length is given and is negative, then that many characters will be omitted from the end of string
'개발 스크랩 메모 > PHP' 카테고리의 다른 글
PHP 스크립트에서 Redis 를 연결할 때 '권한이 거부' 의 의난을 해답하다 (0) | 2020.12.20 |
---|---|
PHP 는 ISO 날짜를 더 읽을 수 있는 형식으로 바꿀까요? (0) | 2020.12.20 |
Apache/PHP/자vascript 장수 연결 (비동기 서버 추송)? (0) | 2020.12.20 |
php 변수 데이터베이스 삽입 (0) | 2020.12.20 |
PHP 세션 시간 초과 htaccess 파일 (0) | 2020.12.20 |
Comments