Remove all html tags from php string

0 votes

I want to display the first 110 characters of a database entry. Pretty easy so far:

<?php echo substr($row_get_Business['business_description'],0,110) . "..."; ?>

But the above entry has HTML code in it that's been entered by the client. So it displays:

<p class="Body1"><strong><span style="text-decoration: underline;">Ref no:</span></strong> 30001<strong></stro...

Obviously no good.

I just want to strip out all HTML code, so I need to remove everything between < and > from the db entry THEN display the first 100 chars.

Any ideas anyone?

Aug 17, 2022 in HTML by Deepak
• 980 points
1,131 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In HTML

0 votes
0 answers

How to remove a underline from a link in HTML?

how to remove the underline from a ...READ MORE

Jul 5, 2022 in HTML by Tejashwini
• 3,820 points
369 views
0 votes
0 answers

How to extract img src, title and alt from html using php?

I want to make a page listing ...READ MORE

Jul 21, 2022 in HTML by Ashwini
• 5,430 points
354 views
0 votes
0 answers

Is there any Blank HTML tags?

Can someone tell me if there are ...READ MORE

May 27, 2022 in HTML by Tejashwini
• 3,820 points
209 views
0 votes
0 answers

How to get the entire document HTML as a string?

Is there a way in javascript to ...READ MORE

Jun 3, 2022 in HTML by Tejashwini
• 3,820 points
294 views
0 votes
0 answers

Which all are the tags allowed inside the <li> tag ?

I have been searching for the list ...READ MORE

Jun 8, 2022 in HTML by Ashwini
• 5,430 points
206 views
0 votes
0 answers

How to use HTML script tags to code while they have a source link?

I have seen that  <script src="..."></script> does not allow ...READ MORE

Jul 4, 2022 in HTML by Tejashwini
• 3,820 points
432 views
+1 vote
2 answers

Scp Php files into server using gradle

Tru something like this: plugins { id ...READ MORE

answered Oct 11, 2018 in DevOps & Agile by lina
• 8,220 points
1,187 views
0 votes
1 answer

How do I create folder under an Amazon S3 bucket through PHP API?

Of Course, it is possible to create ...READ MORE

answered Apr 24, 2018 in AWS by anonymous
10,959 views
0 votes
1 answer

Failure uploading Image on AmazonS3 with PHP SDK

Try this, I took it out from ...READ MORE

answered May 4, 2018 in AWS by Cloud gunner
• 4,670 points
3,742 views
0 votes
1 answer

Trying to call AWS API via PHP

Try using AWS SDK for PHP, Link ...READ MORE

answered Jun 6, 2018 in AWS by Cloud gunner
• 4,670 points
1,483 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP