 
			
				24/02/2010, 09:29
			
			
			     |  
      |    |    |    Fecha de Ingreso: agosto-2008  
						Mensajes: 9
					  Antigüedad: 17 años, 2 meses Puntos: 0     |        |  
  |      Ayuda con maximo de caracteres        Hola tengo una consulta ya que no se mucho de php, por lo que acudo a ustedes para ver si se puede hacer esto.   
La cuestion es que quiero que en el siguiente codigo $news_content tenga una maximo de 200 caracteres a mostrar. Agradezco de antemano su ayuda, saludos     
global $sql2, $tp; 
$caption = "Noticias"; 
$no_news = "No new News"; 
$sol_separator = "<tr>"; 
$eol_separator = "<br /></tr>"; 
$qry = "SELECT news_id, news_title, news_thumbnail, news_body, news_datestamp, news_summary FROM #news WHERE news_render_type = 0 ORDER BY news_id DESC LIMIT 0,4";     
if($sql2->db_Select_gen($qry)) 
{ 
	$n_text = "<table width='100%' border='0' cellpadding='0' cellspacing='0'> 
"; 
	while ($row = $sql2->db_Fetch()) 
	{ 
		$title = $tp->toHTML($row['news_title']); 
		$news_content = $tp->toHTML($row['news_body']); 
		$newssummary = $tp->toHTML($row['news_summary']); 
		$date  = strftime("<div style=' font-style:italic; color: #FFF;'>%d %b : %H:%M</div>", $row['news_datestamp']); 
		$newsimage = ($row['news_thumbnail']) ? "<td style='vertical-align:top;padding:0px;width:20px''><img src='".e_IMAGE."newspost_images/".$row['news_thumbnail']."' alt='' width='60px' height='60px' padding='5px' /></td>" : "";     
		$n_text .=$sol_separator . "".$newsimage."<td style='text-align:left;padding:3px;vertical-align:top'><a href='".e_HTTP."comment.php?comment.news.".$row['news_id']."'><span class='noticias'>".$title."</span></a><br /><span class='noticias_extend'>".$news_content."</span>" .$eol_separator; 
	} 
	$n_text .= "  </table>"; 
} 
else 
{ 
	$n_text = $no_news; 
} 
$ns->tablerender($caption, $n_text);           |