Say i want to loop through XML nodes but i want to ignore the first 10 and then limit the number i grab to 10.

```
$limit=10; //define results limit
$o=20; //define offset
$i=0; //start line counter

foreach($xml->id AS $key => $value){
    $i++;
    if($i > $o){
    //if line number is less than offset, do nothing.
    }else{ 
    if($i == "$limit"){break;} //if line is over limit, break out of loop
    //do stuff here
    }
}

```

So in this example, id want to start on result 20, and only show 10 results, then break out of the loop. Its not working though. Any thoughts?