Skip to content
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
064a1a2
added str-repeat.md in str-repeat folder in string functions (First V…
MMMMMMMZ May 12, 2023
149e305
Update content/php/concepts/string-functions/terms/str-repeat/str-repeat
MMMMMMMZ May 13, 2023
6e6ba63
Update content/php/concepts/string-functions/terms/str-repeat/str-repeat
MMMMMMMZ May 13, 2023
732a633
Update content/php/concepts/string-functions/terms/str-repeat/str-repeat
MMMMMMMZ May 13, 2023
6f4e048
Update content/php/concepts/string-functions/terms/str-repeat/str-repeat
MMMMMMMZ May 13, 2023
3925e5f
Update content/php/concepts/string-functions/terms/str-repeat/str-repeat
MMMMMMMZ May 13, 2023
d7ea8bb
Update content/php/concepts/string-functions/terms/str-repeat/str-repeat
MMMMMMMZ May 13, 2023
924704d
Update content/php/concepts/string-functions/terms/str-repeat/str-repeat
MMMMMMMZ May 13, 2023
84fc28d
Update content/php/concepts/string-functions/terms/str-repeat/str-repeat
MMMMMMMZ May 13, 2023
a4529ff
Removed Repeated metadata
MMMMMMMZ May 13, 2023
e5fece1
Removed Header
MMMMMMMZ May 13, 2023
43b6b9d
Update content/php/concepts/string-functions/terms/str-repeat/str-repeat
MMMMMMMZ May 14, 2023
296566a
Update content/php/concepts/string-functions/terms/str-repeat/str-repeat
MMMMMMMZ May 27, 2023
c79edb4
Update content/php/concepts/string-functions/terms/str-repeat/str-repeat
MMMMMMMZ May 27, 2023
3e7a090
Update content/php/concepts/string-functions/terms/str-repeat/str-repeat
MMMMMMMZ May 27, 2023
f10926a
Update content/php/concepts/string-functions/terms/str-repeat/str-repeat
MMMMMMMZ May 27, 2023
6b6a52e
Update content/php/concepts/string-functions/terms/str-repeat/str-repeat
MMMMMMMZ May 27, 2023
3d36db7
Merge branch 'main' into str_repeat
SSwiniarski May 27, 2023
33c064a
Rename str-repeat to str-repeat.md
SSwiniarski May 27, 2023
1def740
prettier formatting
SSwiniarski May 27, 2023
864953c
Merge branch 'main' into str_repeat
KTom101 May 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
Title: 'str_repeat()'
Description: 'Returns a string with occurrences of a specified substring repeated a specified number of times.'
Subjects:
- 'Computer Science'
- 'Web Design'
- 'Web Development'
Tags:
- 'Strings'
- 'Functions'
CatalogContent:
- 'learn-php'
- 'paths/computer-science'
---

The `str_repeat()` function returns a string that repeats a substring a specified number of times.

## Syntax

```pseudo
str_replace($string, $repeat)
```

- `$string`: Specifies the string to repeat and it is required.
- `$repeat`: Specifies the number of times the string will be repeated. Must be greater or equal to 0 and it is also required.

## Codebyte Example

This example provides a few demonstrations of `str_repeat()` operating on a string.

> **Note:** The third echo statement will not output to the console due to the second argument of `str_repeat` being set to `0`.

```codebyte/php
<?php

echo (str_repeat("I-am-repeated ",3)."\n");
echo (str_repeat("Cool ",10). "\n");
echo (str_repeat("I-don't-appear ",0). "\n");

?>
```