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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:48:09+00:00 2026-05-23T16:48:09+00:00

Basically building a SOAP Client, and part of the required input is formatted as

  • 0

Basically building a SOAP Client, and part of the required input is formatted as so:

<Attributes>
    <Attribute>
         <AttributeType>HomeType</AttributeType>
         <Value>duplex</Value>
    </Attribute>
    <Attribute>
        <AttributeType>Bedrooms</AttributeType>
        <Value>2</Value>
    </Attribute>
    <Attribute>
        <AttributeType>Bathrooms</AttributeType>
        <Value>2</Value>
    </Attribute>
</Attributes>

This is posted via an Array:

$homeType = array (

'AttributeType' => 'HomeType',
'Value' => $_POST['hometype']
);
$bedrooms = array (
'AttributeType' => 'Bedrooms',
'Value' => $_POST['bedrooms']
);
$bathrooms = array(
'AttributeType' => 'Bathrooms',
'Value' => $_POST['bathrooms']
);
$attributes = array (
'Attribute' => $homeType,
'Attribute' => $bedrooms,
'Attribute' => $bathrooms
);

And as you can imagine, all the Array returns is the last attribute, so the xml looks like:

<Attributes>
    <Attribute>
        <AttributeType>Bathrooms</AttributeType>
        <Value>2</Value>
    </Attribute>
</Attributes>

I can’t think of any practical way around this, as the Attributes can count up to 30-50, so I don’t want to numerically key them, especially as the array is only called as:

'Attributes' => $attributes,

Any help would be massively appreciated!

  • 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-23T16:48:09+00:00Added an answer on May 23, 2026 at 4:48 pm

    Shouldn’t you just use an array?
    $attributes = array(
    ‘Attribute’ => array($homeType, $bedrooms, $bathrooms)
    );

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

Sidebar

Related Questions

So basically i am building a script for a client which is used as
I'm building an application which basically has a lot of user input, text boxes,
I'm basically building a simple list, and one of the items in the list
I'm using IIS7 and ASP.NET. Basically building a simple CMS and need to handle
Basically all pages on this site I am building cannot be accessed when the
We are building a configurator application for conveyors. Basically user comes in and picks
I'm building a price estimator form, which uses jQuery to manipulate select menus. Basically,
What frameworks are targeted specifically at building so-called CRUD Admin UIs (basically, a set
The page I'm building depends heavily on AJAX. Basically, there is just one page
Basically, something better than this: <input type=file name=myfile size=50> First of all, the browse

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.