![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi for everybody!!! I?m doing a portal of news and I created a system with php and MySql to solve it. I have a table where a put my news it?s call (noticias) So in a page I created a Recordset the take these news in the table and display it in a page. I created a function (substr), and with it a take the 100 firts letter of my noticia_text and display like a description of the news. Here is the code: ?php $txt = $row_rsNoticias['noticia_texto']; $rest = substr("$tx", 0, 100); ? And I put other code to display the relatin of the news. ?php do { ? br / h3 class="ultimas"><?php echo $row_rsNoticias['noticia_titulo']; ?></h3 p class="margin"><?php echo $rest; ?>...</p a href="noticia_ler.php?noticia_id=<?php echo $row_rsNoticias["noticia_id"]; ?>" class="leia">Leia mais</a hr / ?php } while ($row_rsNoticias = mysql_fetch_assoc($rsNoticias)); ? Good, these codition function perfect but I find I problem and I?m not find a solution for it. The problem is: For every news the description is IGUAL. It isn?t being relative with the each news. And the function (substr) that I created need to tike the 100 first lettter respectiv of each news. Help-me width please! I don?t more what to do to solve it Thanks |
![]() |
| Thread Tools | |
| Display Modes | |
| |