-
php String Functionphp 2023. 8. 24. 08:30
1. strpos -> 문자열에서 부분 문자열이 처음 나타나는 위치를 찾는다
strpos ( string $haystack , string $needle , int $offset= 0 ): int | false
https://secure.php.net/function.strpos
PHP: strpos - Manual
A pair of functions to replace every nth occurrence of a string with another string, starting at any position in the haystack. The first works on a string and the second works on a single-level array of strings, treating it as a single string for replaceme
www.php.net
2. strlen -> 문자열의 길이를 얻는다 ( 띄어쓰기도 읽음 )
strlen ( string $string ): int
3. substr -> 문자열의 일부를 반환
substr ( string $string , int $offset , ? int $length=null ): string
https://www.php.net/function.substr
PHP: substr - Manual
may be by following functions will be easier to extract the needed sub parts from a string: here comes the source:
www.php.net
'php' 카테고리의 다른 글
워드프레스 페이지 추가 (0) 2023.09.01 php 파일 예약 실행 (0) 2023.08.30 ssh 와 깃 허브 (0) 2023.08.23 php 경로 지정 (0) 2023.08.21 객체지향 프로그램 설계 ( SOLID ) (0) 2023.08.21