PHP str_repeat () फ़ंक्शन
उदाहरण
स्ट्रिंग "वाह" को 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 |
टेक्निकल डिटेल
प्रतिलाभ की मात्रा: | बार-बार स्ट्रिंग लौटाता है |
---|---|
पीएचपी संस्करण: | 4+ |
❮ पीएचपी स्ट्रिंग संदर्भ