Position actuelle: Accueil> Catégories de fonctions> str_repeat

str_repeat

Répéter une chaîne
Nom:str_repeat
Catégorie:Chaîne
Langage de programmation:php
Description en une ligne:Répétez la chaîne en tant que nombre de fois spécifié.

Exemple

Répétez la chaîne "Shanghai" 5 fois:

 <span class="token php language-php"><span class="token delimiter important"><? Php</span>
<span class="token keyword">echo</span> <span class="token function">str_repeat</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"Shanghai"</span> <span class="token punctuation">,</span> <span class="token number">5</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

Essayez-le vous-même

Fonctions similaires
Articles populaires