PHP 웹프로그래밍
[문자열함수] stpos() 어떠한 문자열에서 찾고자 하는 문자의
strpos() 어떤 문자열에서 찾고자 하는 문자열의 처음 위치를 구합니다.
int strpos(string haystack, char needle);
haystack 문자열에서 needle 문자의 처음 위치를 구합니다.
int strpos(string haystack, char needle);
haystack 문자열에서 needle 문자의 처음 위치를 구합니다.
<?PHP
$a = "Hello PHP";
echo strpos($a,"P");
?>
실행결과
6