이 함수의 사용법은?

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 :

<?php
$subject = "abcdef";
$pattern = '/^def/';
preg_match($pattern, substr($subject,3), $matches, PREG_OFFSET_CAPTURE);
print_r($matches);
?>

웨에서 PREG_OFFSET_CAPTURE 가 무엇을 뜻하는가요?
|

댓글 2개

http://cafe.naver.com/q69.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=9172
PREG_OFFSET_CAPTURE
If this flag is passed, for every occurring match the appendant string offset will also be returned. Note that this changes the return value in an array where every element is an array consisting of the matched string at index 0 and its string offset into subject at index 1.

http://kr2.php.net/manual/en/function.preg-match.php

여기 참고해보세요
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
17년 전 조회 982
17년 전 조회 1,278
17년 전 조회 1,016
17년 전 조회 956
17년 전 조회 1,514
17년 전 조회 1,292
17년 전 조회 1,619
17년 전 조회 1,083
17년 전 조회 1,513
17년 전 조회 1,566
17년 전 조회 1,530
17년 전 조회 1,633
17년 전 조회 1,545
17년 전 조회 1,271
17년 전 조회 1,492
17년 전 조회 1,636
17년 전 조회 1,839
17년 전 조회 1,538
17년 전 조회 1,377
17년 전 조회 1,523
🐛 버그신고