دالة 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