shorter the text

Dear all

I have a databse and php page...I would like retrieve a database to PHP
page..but i don't want show the all text ...just want as like as little
description (like Apple is ... ... ) and now is display all text like
Apple is red, please teach mw how to do it...

my script:
<td width="348" align="left" bgcolor="#FFFFFF" class="content"><a
href="../whatnews_details.php?news_id=<?php echo
$row_news_summary['news_id']; ?>" target="_parent"><?php echo
$row_news_summary['news_description']; ?></a></td><td width="10"
bgcolor="#FFFFFF" class="content"> </td>
Ace [ Mo, 18 Dezember 2006 09:08 ] [ ID #1571252 ]

Re: shorter the text

Ace schreef:

> Dear all
>
> I have a databse and php page...I would like retrieve a database to PHP
> page..but i don't want show the all text ...just want as like as little
> description (like Apple is ... ... ) and now is display all text like
> Apple is red, please teach mw how to do it...
>
> my script:
> <td width="348" align="left" bgcolor="#FFFFFF" class="content"><a
> href="../whatnews_details.php?news_id=<?php echo
> $row_news_summary['news_id']; ?>" target="_parent"><?php echo
> $row_news_summary['news_description']; ?></a></td><td width="10"
> bgcolor="#FFFFFF" class="content"> </td>

You could try something like this code :

<?php
$variabele = \"like Apple is all over the place.\";
$variabele = substr($variabele,0,10);
// $variabele = \"Like Apple is\"

echo $variabele."...";

?>
jannezz [ Mo, 18 Dezember 2006 10:00 ] [ ID #1571253 ]

Re: shorter the text

jannezz [at] gmail.com wrote:

> Ace schreef:
>
> > Dear all
> >
> > I have a databse and php page...I would like retrieve a database to PHP
> > page..but i don't want show the all text ...just want as like as little
> > description (like Apple is ... ... ) and now is display all text like
> > Apple is red, please teach mw how to do it...
> >
> > my script:
> > <td width="348" align="left" bgcolor="#FFFFFF" class="content"><a
> > href="../whatnews_details.php?news_id=<?php echo
> > $row_news_summary['news_id']; ?>" target="_parent"><?php echo
> > $row_news_summary['news_description']; ?></a></td><td width="10"
> > bgcolor="#FFFFFF" class="content"> </td>
>
> You could try something like this code :
>
> <?php
> $variabele = \"like Apple is all over the place.\";
> $variabele = substr($variabele,0,10);
> // $variabele = \"Like Apple is\"
>
> echo $variabele."...";
>
> ?>

look for "ellipsis" on the following page:

http://uk.php.net/preg_replace
zac.carey [ Mo, 18 Dezember 2006 11:30 ] [ ID #1571254 ]

Re: shorter the text

very helpful...thanks


strawberry =BCg=B9D=A1G

> jannezz [at] gmail.com wrote:
>
> > Ace schreef:
> >
> > > Dear all
> > >
> > > I have a databse and php page...I would like retrieve a database to P=
HP
> > > page..but i don't want show the all text ...just want as like as litt=
le
> > > description (like Apple is ... ... ) and now is display all text like
> > > Apple is red, please teach mw how to do it...
> > >
> > > my script:
> > > <td width=3D"348" align=3D"left" bgcolor=3D"#FFFFFF" class=3D"content=
"><a
> > > href=3D"../whatnews_details.php?news_id=3D<?php echo
> > > $row_news_summary['news_id']; ?>" target=3D"_parent"><?php echo
> > > $row_news_summary['news_description']; ?></a></td><td width=3D"10"
> > > bgcolor=3D"#FFFFFF" class=3D"content"> </td>
> >
> > You could try something like this code :
> >
> > <?php
> > $variabele =3D \"like Apple is all over the place.\";
> > $variabele =3D substr($variabele,0,10);
> > // $variabele =3D \"Like Apple is\"
> >
> > echo $variabele."...";
> >
> > ?>
>
> look for "ellipsis" on the following page:
>
> http://uk.php.net/preg_replace
Ace [ Di, 19 Dezember 2006 04:07 ] [ ID #1572396 ]
Datenbanken » mailing.database.mysql » shorter the text

Vorheriges Thema: help to retieve only the difference in minutes between two dates in DATETIME format
Nächstes Thema: I looking for Paid-help with Maxdb