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

  • SEARCH
  • Home
  • 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 8223967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:53:41+00:00 2026-06-07T14:53:41+00:00

$defindexes = get_tf2_allitem_node($backpack,defindex); $itemmap = array(); foreach ($defindexes as $items) { $imageURL = find_tf2_allitem_node_by_defindex($schema,$items,image_url);

  • 0
$defindexes = get_tf2_allitem_node($backpack,"defindex");

$itemmap = array();
foreach ($defindexes as $items)
{
    $imageURL = find_tf2_allitem_node_by_defindex($schema,$items,"image_url");
    $itemmap[$items] = $imageURL;
}

Essentially I’m trying to parse a schema document, and a backpack document in simpleXML. $defindexes gets all the indexes of items in the given $backpack object. I’m trying to then create a $itemmap of items in backpack => image_url of those items, which I’m polling using find_tf2_allitem_node_by_defindex() and supplying it with the $schema as an argument, and going over each index. I think something’s wrong with the way I’m passing $items to the function, because no values are returning. I’m guessing it has something to do with the fact that $defindexes is an array of objects?

What’s wrong with this?

Sample $defindexes dump :

array(146) { 
    [0]=> object(SimpleXMLElement)#10 (1) { [0]=> string(2) "42" }   
    [1]=> object(SimpleXMLElement)#8 (1) { [0]=> string(2) "44" }  
    [2]=> object(SimpleXMLElement)#11 (1) { [0]=> string(2) "37" } 
    [3]=> object(SimpleXMLElement)#12 (1) { [0]=> string(3) "116" }
    ...
}
  • 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-07T14:53:44+00:00Added an answer on June 7, 2026 at 2:53 pm

    I resolved this by modifying my $defindexes to contain an array of SimpleXML objects casted to strings. In this way the foreach loop was able to complete since the find_tf2_allitem_node_by_defindex() function would now receive a string to parse.

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

Sidebar

Related Questions

I was wondering how I could go about accessing values within an object, such
EDIT: Thanks everyone. I didn't even notice it was private lol, so I changed
In an iPhone app I'm developing, I grab a set of data from a
I have a sax parser which runs when the user taps a start button.
I have a header file that contains a class. Within that class, I have
I've recently hit a strange problem with my iOS app and have no idea
I am getting an error I do not understand. There was even a similar
I recently installed an SSL cert on one of my sites. I have noticed

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.