Strip tags in Rails, Javascript and PHP
Strip tag function is used to remove html tags from the string.
Here I will show you that how to use strip tag in ruby on rails, javascript and php.
#PHP:
Example 1: Remove all html tags.
<?php
$str '
Test1.
text2
';
echo strip_tags($str);
?>
Example 2: Allow p and h1 html tag.
<?php
$str '
Test1.
text2
';
echo strip_tags($str,"
");
?>
#Ruby On Rails
Example 1: Remove all html tags
#model
class User < [...]
- Programming Language:
- Tags:
- Technology:


Recent comments
1 year 23 weeks ago
1 year 23 weeks ago
1 year 25 weeks ago
1 year 27 weeks ago
1 year 42 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 46 weeks ago
1 year 48 weeks ago