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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T18:32:43+00:00 2026-05-29T18:32:43+00:00

I have some text like $text=–e89a8f234aade3345704b8477b83 Content-Type: text/plain; charset=ISO-8859-1 this is a text. this

  • 0

I have some text like $text="--e89a8f234aade3345704b8477b83 Content-Type: text/plain; charset=ISO-8859-1 this is a text. this is a text. --e89a8f234aade3345704b8477b83 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable this is a text.";

I want the output as $output="this is a text. this is a text.";

One more eg:- $text="--14dae9340ba954ae0704b84acde9 Content-Type: text/plain; charset=ISO-8859-1 First Name: aaa Last Name: aaa --14dae9340ba954ae0704b84acde9 Content-Type: text/html; charset=ISO-8859-1 First Name: James Last Name: Cummings --14dae9340b";

Output should be $output="First Name: aaa Last Name: aaa";

I am not getting how to do this.

  • 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-29T18:32:45+00:00Added an answer on May 29, 2026 at 6:32 pm

    In case you are sure that charset is ISO-8859-1 and string does not contain — :

    $a=explode("charset=ISO-8859-1",$text);
    $b=explode("--",$a[1]);
    $output=$b[0];
    

    If you’re still sure about the charset, but not the –:

    $aa=substr($text,0,30);
    $a=explode("charset=ISO-8859-1",$text);
    $b=explode($aa,$a[1]);
    $output=$b[0];
    

    And if you’re not even sure about the charset:

    $aa=substr($text,0,30);
    $a=explode("charset=",$text);
    $a2=explode(" ",$a[1]);
    $b=explode($aa,$a2[1]);
    $output=$b[0];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some Plain Text/HTML Content like so: Title: Lorem ipsum dolor sit amet,
I have some text looking like this: My arbitrary content.... ```c# public class Foo
I have some text like this: এর জন্য বুদ্ধির (Reason) প্রয়োজন নেই, প্রয়োজন নিজের
I have some text that is stored in a variable like this: <div class=foo>text
Hey, I have some text that is formatted like this: [quote]foo text[/quote] and I
If I have some xml like this: <mynode> <mysubnode> <mysubsubnode>hello world</mysubsubnode> some more text
I have some text where unicode is written as text like this There areu25ba
I have some text, something like this: Paragraphs of text (SOME KNOWN TEXT)Unknown Text(SOME
So I have some HTML text that I would like to display in a
I have some data like this <div> This is some text </div> and i

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.