Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/04/2009, 11:02
flatron666
 
Fecha de Ingreso: marzo-2009
Mensajes: 55
Antigüedad: 15 años, 1 mes
Puntos: 0
Acortar variable

Hola a todos.
Tengo una linea de script que imprime una variable ($title).
¿Como podria hacer para que solo imprima los primeros 20 caracteres, y no todo el titulo completo?.

Script:

<?php print "<a href=\"news.php?newsid=$newsid\"target=\"51net2\" class=\"en_b\"><img src=\"./images/bullet_b.gif\" width=\"11\" height=\"9\" border=\"0\">$title</a><br><br>"; ?>

Gracias por todo.