Reputation: 177
I have a text in my database with html tags to make the direction from right to left. and I am looking for a way to get the text from the database without the html tags.
this is how my text looks in the database:
<span dir="rtl"> ما هي تقنية GPS؟</span >
and I want to get it just like this:
ما هي تقنية GPS؟
I am using this code to get the text:
<?php echo $text_db; ?>
Upvotes: 0
Views: 953
Reputation: 1087
There are several ways to get rid of HTML structure from a string, the quickest you can use is strip_tags($string)
- https://php.net/strip_tags
Upvotes: 2