現在の位置: ホーム> 関数カテゴリ一覧> str_repeat

str_repeat

文字列を繰り返します
名前:str_repeat
カテゴリ:
対応言語:php
一言説明:指定された回数として文字列を繰り返します。

文字列「上海」を5回繰り返します:

 <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>

自分で試してみてください

類似の関数
  • ナチュラルオーダーアルゴリズムを使用して文字列を比較する(ケースの非感受性) strnatcasecmp

    strnatcasecmp

    ナチュラルオーダーアルゴリズムを使用して
  • 文字列のすべての新しい行の前にhtml newlineタグを挿入します nl2br

    nl2br

    文字列のすべての新しい行の前にhtmln
  • フォーマットされた文字列を返します sprintf

    sprintf

    フォーマットされた文字列を返します
  • 2つの文字列間の編集距離を計算します levenshtein

    levenshtein

    2つの文字列間の編集距離を計算します
  • 文字列をランダムに破壊します str_shuffle

    str_shuffle

    文字列をランダムに破壊します
  • メタカラクターセットを脱出します quotemeta

    quotemeta

    メタカラクターセットを脱出します
  • 文字列を小さなチャンクに分割します chunk_split

    chunk_split

    文字列を小さなチャンクに分割します
  • 16進数文字列をバイナリ文字列に変換します hex2bin

    hex2bin

    16進数文字列をバイナリ文字列に変換しま
人気記事(にんききじ)