Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6703665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:11:54+00:00 2026-05-26T07:11:54+00:00

Possible Duplicate: Regex Remove Images with style tag from Html PHP XML remove element

  • 0

Possible Duplicate:
Regex Remove Images with style tag from Html
PHP XML remove element and all children by name

How can I remove Button or input type=”button” tags in PHP?

<button>button_name</button>

I want to remove both of tag and the content inside of it.

How can I do this in PHP?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:11:55+00:00Added an answer on May 26, 2026 at 7:11 am

    If you have a little more information about your exact goal, that would be helpful. Usually, the PHP is creating the button in the first place, so the easiest thing would be to find where in the script that html is being generated, make sure you are not going to be breaking something critical, and delete it from the php script.

    One way of finding the place in the php code where the button is being generated is to do a multi-file find in your IDE or advanced text editor. Try searching for <button> and see if you can find the exact button you are trying to eliminate.

    By the way, before you delete anything permanently, I highly recommend committing to your version control system, or at least making a manual backup of the file unless you have deleted the wrong thing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How can I remove external links from HTML using Perl? Alright, i'm
Possible Duplicate: Regex to change format of all img src attributes Hi, I want
Possible Duplicate: RegEx match open tags except XHTML self-contained tags I have a HTML
Possible Duplicate: Replace all < and > that are NOT part of an HTML
Possible Duplicate: PHP validation/regex for URL Hi, in my form I have a url
Possible Duplicate: Remove all multiple spaces in Javascript and replace with single space How
Possible Duplicate: How do I remove diacritics (accents) from a string in .NET? Our
Possible Duplicate: regex replace all ignore case I need to replace all occurrences of
Possible Duplicate: Regex - Return First and Last Name Hi, I have the full
Possible Duplicate: PHP validation/regex for URL Is there any easy, secure and fast way

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.