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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:53:11+00:00 2026-05-13T16:53:11+00:00

I have an array that is formatted like so (this example has 5 keys):

  • 0

I have an array that is formatted like so (this example has 5 keys):

[0]: HTTP/1.1 200 OK
[1]: Date: Wed, 10 Feb 2010 12:16:24 GMT
[2]: Server: Apache/2.2.3 (Red Hat)
[3]: X-Powered-By: PHP/5.1.6
[4]: etc..

The array keys sometimes alternate, as one may be omitted. How can I search for the array with “Server: …” in it, and if it exists display it?

For the life of me I am confused!

  • 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-13T16:53:11+00:00Added an answer on May 13, 2026 at 4:53 pm

    Try this:

     foreach($your_array as $value)
     {
      if (stripos($value, 'Server:') !== false)
      {
        echo $value;  // we found it !!
        break;
      }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 297k
  • Answers 297k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You're animating the .width element, but stopping the .track-version element.… May 13, 2026 at 7:14 pm
  • Editorial Team
    Editorial Team added an answer What you're asking for is a foreign key constraint. You'd… May 13, 2026 at 7:14 pm
  • Editorial Team
    Editorial Team added an answer Some IDE use Vim's socket interface (also known as Vim… May 13, 2026 at 7:14 pm

Related Questions

I need a way of sorting a string I have in PHP, the string
Hey guys this is a followup to my previous question . I now have
I have weather forecast data formatted like so: loc_id#location#state#forecast_date#issue_date#issue_time#min_0#max_0#min_1#max_1#min_2#max_2#min_3#max_3#min_4#max_4#min_5#max_5#min_6#max_6#min_7#max_7#forecast_0#forecast_1#forecast_2#forecast_3#forecast_4#forecast_5#forecast_6#forecast_7# 090180#Airey's Inlet#VIC#20091204#20091204#161830###12#19#12#21#12#19#12#17#11#20#12#20#11#17#Mostly clear.#Shower or two.#Light
I'd like to work on a project, but it's a little odd. I want
I am working with an open-source UNIX tool that is implemented in C++, and

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.