![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
06/01/2002, 15:54
|
![Avatar de Ferdy](http://static.forosdelweb.com/customavatars/avatar7457_1.gif) | Colaborador | | Fecha de Ingreso: junio-2001 Ubicación: España
Mensajes: 1.430
Antigüedad: 23 años, 8 meses Puntos: 0 | |
Re: Hacer ... en frases de mas longitud Bueno, pues algo así valdría<pre><?php
//
// string corte(string str)
//
function corte($str)
{
if (empty($str))
{
return "";
}
else if (strlen($str)>15)
{
return (substr($str,0,12)."...");
}
else
{
return $str;
}
}
?> </pre>
Salu2 - Fernando Pereda ( Ferdy )
<center><a href="http://www.ferdyx.org/firmas.php"><img src="http://www.ferdyx.org/reg_tira.jpg" border="0"></a></center> |