|
Posted by Tony on 07/20/05 20:01
Stefan Rybacki wrote:
> Hello wrote:
>> There is a function in PHP that strips the HTML tags called
>> "strip_tags" then when you get the string back with no tags use
>> "substr" or something to get the first 100 chars.
>>
>>
> How will that help him, since I guess he needs the HTML tags?!
>
I could see that possibly causing some problems, since you would have
opening tags but no closing tags. Depending on the tags, of course:
<pre>This is a string of more than 100 characters. This is a string of more
than 100 characters. This is a string of more than 100 characters. This is a
string of more than 100 characters. This is a string of more than 100
characters. This is a string of more than 100 characters.</pre>
could cause the rest of the page to not function properly. Seems to me that
stripping the HTML would be better, if you're not displaying the whole
string.
--
Tony Garcia
Web Right! Development
Riverside, CA
www.WebRightDevelopment.com
Navigation:
[Reply to this message]
|