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 8868199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:12:45+00:00 2026-06-14T17:12:45+00:00

$str='<html>…<header>…</header>…</html>’; //$str='<HTML>…<HEADER>…</HEADER>…</HTML>’; $header = explode(<header>, $str, 2); echo $header[1]; I have many html code,

  • 0
$str='<html>...<header>...</header>...</html>';
//$str='<HTML>...<HEADER>...</HEADER>...</HTML>';
$header = explode("<header>", $str, 2);
echo $header[1];

I have many html code, I want explode header tag, but some uppercase and some are lowercase, cause the $str is very huge, I do not want use str_replace() change them all to uppercase or lowercase, is there any easy way to explode header tag for 2 part from a $str? Thanks.

  • 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-06-14T17:12:47+00:00Added an answer on June 14, 2026 at 5:12 pm

    There is a way – preg_split() function!

    Didn’t test the regex, but i think this is what you’re looking for:

    $header = preg_split("/<header>/i", $str);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a Web Forms application and I have some HTML code
I have this code to extract title: soup = BeautifulSoup.BeautifulSoup(urllib.urlopen(url)) title = str(soup.html.head.title.string).lstrip(\r\n).rstrip(\r\n) Some
The website html is like this, I want that embeded code using curl. concept
I want to get the output of url like http://example.com/mymovieSeatBook.html?booking=0-0 >0-1 but my example
Well, i have this code that is supposed to check if the html is
some test get a tag from http://www.msnbc.msn.com/ use simple html dom. $ch = curl_init();
<html> <body> <script type=text/javascript> var str=Welcome to Microsoft! ; var val=Microsoft!; document.write(str.replace('/'+val'+/gi', W3Schools)); </script>
str = "&&"; label1.Text = str; but it only shows "&". How do I
String str = abcde123_92qwq_1a_02x_1e; I want to replace the first string part between the
if(str.contains(final)) { id = Integer.parseInt(str.substring(18, str.length() - 6)); } System.out.println(id); This line of code

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.