Join Up!
104886 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousvsprintfSybasenext
Last updated: Tue, 29 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | German

wordwrap

(PHP 4 >= 4.0.2)

wordwrap --  Corta una cadena en un número dado de caracteres usando un caracter de ruptura de cadenas.

Descripción

string wordwrap ( string cad [, int ancho [, string ruptura]])

Corta la cadena cad en la columna especificada por el parámetro (opcional) ancho. La línea se rompe utilizando el parámetro (opcional) ruptura.

wordwrap() automáticamente cortará en la columna 75 y usará '\n' (nueva línea) si no se especifican el ancho o la ruptura.

Ejemplo 1. Ejemplo de wordwrap()

$texto = "El veloz murciélago hindú comía feliz cardillo y kiwi.";
$textonuevo = wordwrap( $texto, 20 );

echo "$textonuevo\n";

Este ejemplo mostraría:

El veloz murciélago 
hindú comía feliz cardillo y kiwi.

Vea también nl2br().

User Contributed Notes
wordwrap
add a note about notes
There are no user contributed notes for this page.
previousvsprintfSybasenext
Last updated: Tue, 29 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST