<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.strings.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'function.str-repeat.php',
    1 => 'str_repeat',
    2 => 'Repite un string',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => 'Funciones de strings',
  ),
  'prev' => 
  array (
    0 => 'function.str-pad.php',
    1 => 'str_pad',
  ),
  'next' => 
  array (
    0 => 'function.str-replace.php',
    1 => 'str_replace',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/strings/functions/str-repeat.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.str-repeat" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">str_repeat</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">str_repeat</span> &mdash; <span class="dc-title">Repite un string</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.str-repeat-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>str_repeat</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$string</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$times</code></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   Retorna el string <code class="parameter">string</code> repetido
   <code class="parameter">times</code> veces.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.str-repeat-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">string</code></dt>
     <dd>
      <p class="para">
       El string a repetir.
      </p>
     </dd>
    
    
     <dt><code class="parameter">times</code></dt>
     <dd>
      <p class="para">
       Número de veces que el string <code class="parameter">string</code>
       debe ser multiplicado.
      </p>
      <p class="para">
       <code class="parameter">times</code> debe ser positivo o nulo.
       Si <code class="parameter">times</code> es 0, la función retorna
       el string vacío.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.str-repeat-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   Retorna el string, repetido <code class="parameter">times</code> veces.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.str-repeat-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Ejemplo con <span class="function"><strong>str_repeat()</strong></span></strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">str_repeat</span><span style="color: #007700">(</span><span style="color: #DD0000">"-="</span><span style="color: #007700">, </span><span style="color: #0000BB">10</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>El ejemplo anterior mostrará:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">-=-=-=-=-=-=-=-=-=-=</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.str-repeat-seealso">
  <h3 class="title">Ver también</h3>
  <p class="para">
   <ul class="simplelist">
    <li><a href="control-structures.for.php" class="link">for</a></li>
    <li><span class="function"><a href="function.str-pad.php" class="function" rel="rdfs-seeAlso">str_pad()</a> - Completa un string hasta un tama&ntilde;o dado</span></li>
    <li><span class="function"><a href="function.substr-count.php" class="function" rel="rdfs-seeAlso">substr_count()</a> - Cuenta el n&uacute;mero de ocurrencias de segmentos en un string</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>