PHP str_repeat() 함수
예시
"Wow" 문자열을 13번 반복합니다.
<?php
echo str_repeat("Wow",13);
?>
정의 및 사용
str_repeat() 함수는 문자열을 지정된 횟수만큼 반복합니다.
통사론
str_repeat(string,repeat)
매개변수 값
Parameter | Description |
---|---|
string | Required. Specifies the string to repeat |
repeat | Required. Specifies the number of times the string will be repeated. Must be greater or equal to 0 |
기술적 세부 사항
반환 값: | 반복되는 문자열을 반환 |
---|---|
PHP 버전: | 4+ |
❮ PHP 문자열 참조