shorter the text

shorter the text

am 18.12.2006 09:08:15 von Ace

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:
href="../whatnews_details.php?news_id= $row_news_summary['news_id']; ?>" target="_parent"> $row_news_summary['news_description']; ?> bgcolor="#FFFFFF" class="content"> 

Re: shorter the text

am 18.12.2006 10:00:04 von jannezz

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:
> > href="../whatnews_details.php?news_id= > $row_news_summary['news_id']; ?>" target="_parent"> > $row_news_summary['news_description']; ?> > bgcolor="#FFFFFF" class="content"> 

You could try something like this code :

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

echo $variabele."...";

?>

Re: shorter the text

am 18.12.2006 11:30:42 von zac.carey

jannezz@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:
> > > > href="../whatnews_details.php?news_id= > > $row_news_summary['news_id']; ?>" target="_parent"> > > $row_news_summary['news_description']; ?> > > bgcolor="#FFFFFF" class="content"> 
>
> You could try something like this code :
>
> > $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

Re: shorter the text

am 19.12.2006 04:07:22 von Ace

very helpful...thanks


strawberry =BCg=B9D=A1G

> jannezz@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:
> > > "> > > > href=3D"../whatnews_details.php?news_id=3D > > > $row_news_summary['news_id']; ?>" target=3D"_parent"> > > > $row_news_summary['news_description']; ?> > > > bgcolor=3D"#FFFFFF" class=3D"content"> 
> >
> > You could try something like this code :
> >
> > > > $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:
>=20
> http://uk.php.net/preg_replace