game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online

strip_tags php

strip_tags function of php

strip_tags — Strip HTML and PHP tags from a string

<?php
$text = ‘This shop at Bypass Road has a practice of charging by looking at customers not at product.<br />
<br />
<p>Test paragraph.</p><!– Comment –> <a href=”#fragment”>Other text</a>’;
echo strip_tags($text);
echo “\n”;

// Allow <p> and <a>
echo strip_tags($text, ‘<p><a>’);
?>

The output of the above  strip_tags php

This shop at Bypass Road has a practice of charging by looking at customers not at product.Test paragraph.Other text

2nd out put of  strip_tags php

‘This shop at Bypass Road has a practice of charging by looking at customers not at product.<br />
<br />
Test paragraph.<!– Comment –> Other text

do not allow URL auto hyperlink using php

do not allow URL auto hyperlink using php

Don’t Display HTML Tags In Textbox

i have a textbox which i save the entered info into MySQL, but because i want to display this on a webpage i also save the HTML tags into the MySQL like so:

$product_description = htmlentities($_POST['product_description'], ENT_QUOTES);
$product_description = nl2br($product_description);
// write $product_description to database

This all works fine when the datadata is then retrieved and displayed on a web page.

But if u  don’t want to display  ”a” tag submitted and don’t want to display on the front end side.

means on user side so link but not as hyperlink

than u can use

$comPlaint = strip_tags($comPlaint, ‘<br /><p>’);

this will allow only br and p tag

u can use more tags to allow…