Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/07/2003, 10:18
kryna
 
Fecha de Ingreso: diciembre-2002
Ubicación: Villa Alemana
Mensajes: 103
Antigüedad: 21 años, 4 meses
Puntos: 0
Pregunta subdividir un string

hola !

mi problema es el siguiente:


tengo un archivo con BD Postgresql:


Column | Type |
----------+-----------------------+------
id | integer |
autor | character varying(30) |
edicion | character varying(30) |
fecha | character varying(25) |
titulo | character varying(25) |
texto | text |

en el campo texto almaceno una gran cantidad de texto, publicaciones de periodicos, es decir 500 caracteres app.
el problema es:

no puedo despelgar todo este campo en una pagina, por loq trato de subdividir el texto en varias partes, pero no me resulta
buscando funciones de Php encontre un monton, pero no se si las aplico mal o simplemente he entendido mal su funcionamiento.

Aqui pongo el codigo:

Código PHP:
<form  name=voxp>
<table width="780" height="600" border="0">
<tr>
   <td height="90" ></td>
   <td height="90" ></td>
</tr>
<tr>
  <td height="100" width="80"  > </td>
  <td width="290">

     <p> <? echo $registro['autor'];   ?></p>
     <p> <? echo $registro['edicion']; ?></p>
     <p> <? echo $registro['fecha'];   ?></p>

  </td>
     <td rowspan="2" width="300">
     <p> <? $texto=$registro['texto'];
                    echo 
chunk_split($texto,75); ?></p>
   </td>


 </td>
</tr>
<tr>
   <td height="360"></td>
   <td height="360"></td>

</tr>

</table>
</form>

como se ve aca
Código PHP:
     <p> <? $texto=$registro['texto'];
                    echo 
chunk_split($texto,75); ?></p>
no funciona pues tira igual todo el campo, existe alguna funcion q sirva para sacar una parte del texto de un string, ya sea del comienzo, medio o final?

gracias