xml again..
I want to select a sub set of nodes ( for pagination purposes ) from a set.
$nodes = $xml->query(//parent
/child[sex = 'male'
and position() >= 10
and position() < 21]);
If I’m not mistaken that would only select male children who are the 10th to 20th child.
what I need is to select the first 10-20 (or 30-40) males in the set…
sure I’m being a noob and have done this before but its friday…
ta peeps
Have the position condition operate on the result nodeset of your initial condition: