Limiting XML read to 5 records
- by Jean
Hello,
I have a xml file with 100 records, but I want it to limit it to just 5 records
for ($i=0;$i<=5;$i++) {
foreach($xml-entry as $result){
if ($result->updated == $result->published) {
}
}
}
When I put in the above code, it display one record 5 times.
Thanks
Jean