can i remove html tags using php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

can i remove html tags using php

Post by itsmani1 »

Hi

I want to remove html tangs of a string using php.

is there any function that can help me?

like

$str='<b>Hello</b> Mannan';

I want to make it
$str = 'Hello Mannan';

thank ya all
User avatar
mattcooper
Forum Contributor
Posts: 210
Joined: Thu Mar 17, 2005 5:51 am
Location: London, UK

Re: can i remove html tags using php

Post by mattcooper »

Use this:

Code: Select all

<?php $str = strip_tags('<b>Hello</b> Mannan'); ?>
Easy :)
Post Reply