Limit Characters, after stripping tags?
-
Hi,
After digging around these forums, I found a simple bit of PHP to strip the tags out of a post:
<?php ob_start(); the_content(); $old_content = ob_get_clean(); $new_content = strip_tags($old_content); echo $new_content; ?>
This works great, and outputs the entire post without tags. However, I’m trying to restrict the number of characters that are output to 200. Is this possible? Any help would be greatly appreciated.
Thanks!
Jamie
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Limit Characters, after stripping tags?’ is closed to new replies.