Hey Wuup readers. I’ve got a simple post here for those learning PHP, or even the more seasoned programmer. If you’re looking for a simple way to to remove white space from strings, and strip html tags from strings too, try this out. It can be handy if you don’t want people to abuse a form or field in an application:
<?php $example = " test ff 1 <br > </p> hi "; $result = rtrim($example); echo trim(strip_tags($result)); ?>







PHP Basics : Removing White Space / HTML Tags From A String | Wuup on 16 October, 2009
[...] the rest here: PHP Basics : Removing White Space / HTML Tags From A String | Wuup SHARETHIS.addEntry({ title: "PHP Basics : Removing White Space / HTML Tags From A String | Wuup", [...]
. o O ( Simple PHP Reviewed: Scam or Serious? ) on 17 October, 2009
[...] may also want to check out: PHP Basics : Removing White Space / HTML Tags From A String | Wuupe-Books Baba » Smarty PHP Template Programming And ApplicationsWeb Developer Plus – [...]