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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:51:47+00:00 2026-06-16T00:51:47+00:00

I am having a hard time figuring out where to go next. I have

  • 0

I am having a hard time figuring out where to go next.
I have set up a pipe to program on my cpanel that takes emails and sends em to a php script I have.

The script takes the email, extracts the body, and assigns the entire body to a variable called $body. What I need to do next, is take the information in the body, and make them more php variables that I can sent to an API.

The email will ALWAYS be in the same format.
This is what I get when I ask the script to send me an email of the $body variable.

--14dae934062f9d9cee04d111829f
Content-Type: text/plain; charset=ISO-8859-1

*field_1* = Illinois
*field_2* = miguel
*field_3* = martinez
*field_4* = miguel41303427@sbcglobal.net
*field_5* = 2305250033
*field_6* = streamwood
*field_7* = il
*field_8* = 2001
*field_9* = BMW
*field_10* = 325i
*field_11* = 129000

--14dae934062f9d9cee04d111829f
Content-Type: text/html; charset=ISO-8859-1

<p class="MsoNormal"><b>field_1</b> = Illinois<br>
<b>field_2</b> = miguel<br>
<b>field_3</b> = martinez<br>
<b>field_4</b> = <a href="mailto:miguel41303427@sbcglobal.net">miguel41307@sbcglobal.net</a><br>
<b>field_5</b> = 2305250033<br>
<b>field_6</b> = streamwood<br>
<b>field_7</b> = il<br>
<b>field_8</b> = 2001<br>
<b>field_9</b> = BMW<br>
<b>field_10</b> = 325i<br>
<b>field_11</b> = 129000<br></p>

--14dae934062f9d9cee04d111829f--

Is there a way to take the value of field_1, in this case Illinois, and assign it to say $state

  • 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-16T00:51:47+00:00Added an answer on June 16, 2026 at 12:51 am

    It can be done with a regex. Try something like that :

    if(preg_match('/<b>field\_1<\/b>(.*)<br>/', $body, $matches))
     $field1 = $matches[1];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having a hard time figuring out the best way to do this... I have
I'm having a hard time figuring out why this is not working. I have
Below is a method that I'm having a hard time figuring out how to
I'm having hard time figuring out how to set HorizontalOffset and ScrollToHorizontalOffset of a
I'm having a hard time figuring out how best to do this. I have
I am new here, but I am having hard time figuring out how to
Having a hard time figuring out why this alert code is being called once
I am having a hard time figuring out how to get cascading drop down
I am having a hard time figuring out what flags to pass to g++
I am having a hard time figuring out how to show an Image (or

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.