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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:06:37+00:00 2026-06-16T04:06:37+00:00

I use XML import for my website. The main problem is the execution time

  • 0

I use XML import for my website. The main problem is the execution time and the limit enforced by my server. Because of that I want to split XML import into segments. My script looks so far in this way:

$xml = simplexml_load_file('test.xml');

foreach ($xml->products as $products) {

...

}

The question is how can I start foreach command from specific moment, e.g. foreach could start from 100. I know it can be done in this way below, but is there any easier way?

$n=0;
foreach ($xml->products as $products) {
$n++;
if ($n>99) { //do something }
else { //skip }

}
  • 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-16T04:06:38+00:00Added an answer on June 16, 2026 at 4:06 am

    Just use a for loop, than you can specify the range you want to loop over

    for($i = 100; $i < 200; $i++)
    {
    //do something
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use XML for UI layout and element definition. Want them to
I have written a code that can save data into xml. NOW I want
In my Android app I use: import javax.xml.bind.JAXBContext; But I get: The import javax.xml.bind
For writing my XML I use the following code: $xml = simplexml_load_file('import.xml'); foreach($xml->Классификатор->Группы->Группа as
I need to import some XML schemas. In Delphi, I would use the the
I'm building a website that is going to import products from several different sources.
I have a java application that use spring with a spring.xml file in the
I'd like to use Excel's XML Map feature from server-side C# in a web
I am trying to use XML::RAI perl module on UTF8 coded text and I
I imagine to use XML serialization like this: class Foo { public Foo (string

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.