0

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; ?>      
1
  • have you tried strip_tags already? Commented Mar 26, 2015 at 11:58

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.