To help you understand why this data is being output more than once I'll give you some general debugging advice.
The aim in this case is to find out where the repeated data is coming from.
I would start by creating a test variable $testing = 0
in the first line of the php file. Then replace
echo $hcr;
With:
$testing ++;
echo $hcr.' Loop:'.$testing;
This will determine if this section of code is being executed more than once. If it is it will also tell you how meany times.
If the string Loop:...
is not displayed with the other instances of the data then you are useing echo $hcr
in other places in your code.
Edit:
Because the counter is not being incremented the php file must be included more than once. Check for include xyz.php;
in the main php file, probably index.php
.