Re: Kinda HTML and PHP question....
| From: | Julio Nobrega Trabalhando | Date: | Wed, 01 May 2002 22:43:54 +0000 |
| Subject: | Re: Kinda HTML and PHP question.... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95619@lists.php.net to get a copy of this message | ||
$text = substrt($text, 0, 75) . '...';
Cuts anything beyond 75 caracthers and add "..." to the end of it.
Also, you could when people submit anything check for spaces if the size
is greater than a number of characters:
if (strlen($text) > '75' && !ereg(' ', $text)) {
echo 'Please use spaces!';
}
--
Julio Nobrega.
Um dia eu chego lá:
http://sourceforge.net/projects/toca
Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
"Mantas Kriauciunas" <Mantuks@attbi.com> wrote in message
news:77668625793.20020501165726@attbi.com...
> Hey PHP General List,
>
> I have news thing in MySQL database... i made tables that is good
> to look under 800x600 and highet.. now i am outputing from database
> $full_news line like this:
>
> echo "Full Story:<br>$myrow[3]<br><br>\n";
>
> so the problem is... like some stupid people put word...without
> spaces or something without them...just letters.... no spaces...and
> it doesn't warp the text. What do you think i should do at that
> point? What do you do in your sites to protect that? because my
> tables get wight bigger..they are set to wight=100% ..... thanks for
> any help or any suggestion what should i do.
>
>
> :------------------------------:
> Have A Nice Day!
> Mantas Kriauciunas A.k.A mNTKz
>
> Contacts:
> Mantuks@attbi.com
> Http://mntkz-hata.visiems.lt
>