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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:39:55+00:00 2026-05-21T10:39:55+00:00

I want to return the ‘message->text’ part of this array. Can you help me?

  • 0

I want to return the ‘message->text’ part of this array. Can you help me? I am having some difficulty with this.

Array (
    [name] => new exp
    [created] => Array (
        [date] => 20110304
        [time] => 11:09:27
        [version] => 2.02.6
    )
    [message] => Array (
        [0] => Array (
            [@attributes] => Array (
                [id] => 0 [mbox] => recipe
            )
            [received] => Array (
                [date] => 20090304
                [time] => 13:16:48
            )
            [from] => Array (
                [name] => Andrew Welch
                [email] => <email address removed>
            )
            [to] => Array (
                [name] => <email address removed>
                [email] => <email address removed>
            )
            [messageid] => <email address removed>
            [subject] => aloo paranthas
            [text] => you take potatoes ... to cook.
            [attachment] => Array (
                [name] => part-003.html
                [dir] => page0001/000000
                [bytes] => 864
                [size] => 864.00 B
                [type] => text/html
            )
            [mboxname] => recipe
        )
        [1] => Array (
            ...
  • 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-21T10:39:56+00:00Added an answer on May 21, 2026 at 10:39 am

    The array structure is like so:

    Array (
        ...
        [message] => Array (
            [0] => Array (
                ...
                [text] => you take potatoes ... to cook.
                ...
            )
            [1] => Array (
                ...
            )
            ...
        )
    )
    

    So $data['message'] is itself an array:

    for($i = 0, $l = count($data['message']); $i < $l ; $i++) {
        echo $data['message'][$i]['text'];
    }
    

    I suggest to read about arrays in PHP.

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

Sidebar

Related Questions

I want to return first 5 items from array. How can I do this?
I want some return about dom manipulation. I think we can save elements' status
I want to return some errors to my jquery method. What is happening is
I want to return some files in a HttpResponse and I'm using the following
I want to return an array of strings from an MVC function via a
i want to return a string value from an anonymous method/delegate. How can i
I want to return all of the indices from an array where a condition
I want to return in a Stored Function a value as TEXT but I
I want to return the value of my array plus the return value of
I want to return List<ClassName> & count(int) from code-behind(C#) to javascript. How can 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.