This is inside an html document called rockwell.php. The php script works if `$xmlData->checkerz[0]->attributes()->labro;` when looping, but `$xmlData->checkerz[$x]->attributes()->labro;` prevents the rest of the html from loading when looping. Why would this looping parse conflict with everything below it in html?

```
<!DOCTYPE html>
<html lang="en">
...

    <?php

    header('Content-type: application/xml');

    $privatecode = 'thisz';

    $year = date("Y");
    $month = date("n");
    $day = date("d");

    $url =  'api.php?private='.$privatecode.'&day='.$day.'&month='.$month.'&year='.$year;
    $mis = file_get_contents($url);
    $xmlData = simplexml_load_string($mis);
    if (count($xmlData->checkerz) == 0) {
    }
    else {
    for ($x = 0; $x <= 5; $x++) {
    if ($x < count($xmlData->checkerz)) {  
    $timestampa = $xmlData->checkerz[$x]->attributes()->labro; //stops html here
    $timestampb = $xmlData->checkerz[$x]->attributes()->day;   //or here
    $timestampc = $xmlData->checkerz[$x]->attributes()->month; //or here
    $timestampd = $xmlData->checkerz[$x]->attributes()->year;  //or here
    if ($timestampc == '1') {
    $timestampe = 'January '.$timestampb.', '.$timestampa.'</br>';
    echo $timestampe;
    }
    else if ($timestampc == '2') {
    $timestampe = 'February '.$timestampb.', '.$timestampa.'</br>';
    echo $timestampe;
    }
    else if ($timestampc == '3') {
    $timestampe = 'March '.$timestampb.', '.$timestampa.'</br>';
    echo $timestampe;
    }
    else if ($timestampc == '4') {
    $timestampe = 'April '.$timestampb.', '.$timestampa.'</br>';
    echo $timestampe;
    }
    else if ($timestampc == '5') {
    $timestampe = 'May '.$timestampb.', '.$timestampa.'</br>';
    echo $timestampe;
    }
    else if ($timestampc == '6') {
    $timestampe = 'June '.$timestampb.', '.$timestampa.'</br>';
    echo $timestampe;
    }
    else if ($timestampc == '7') {
    $timestampe = 'July '.$timestampb.', '.$timestampa.'</br>';
    echo $timestampe;
    }
    else if ($timestampc == '8') {
    $timestampe = 'August '.$timestampb.', '.$timestampa.'</br>';
    echo $timestampe;
    }
    else if ($timestampc == '9') {
    $timestampe = 'September '.$timestampb.', '.$timestampa.'</br>';
    echo $timestampe;
    }
    else if ($timestampc == '10') {
    $timestampe = 'October '.$timestampb.', '.$timestampa.'</br>';
    echo $timestampe;
    }
    else if ($timestampc == '11') {
    $timestampe = 'November '.$timestampb.', '.$timestampa.'</br>';
    echo $timestampe;
    }
    else if ($timestampc == '12') {
    $timestampe = 'December '.$timestampb.', '.$timestampa.'</br>';
    echo $timestampe;
    }
    else {
    }
    }
    }
    }
    ?>

...
</html>

```