Okay... The place you are echoing it (that you know about), change it to: echo '<!-- point1 -->' . $ad_network . '<!-- point2 -->'; PHP: Then we can at least see make sure it's not being echoed out again somewhere else.
It's being echoed out twice somewhere (and not from the same bit of code being called twice). If you look at the source, only the 2nd set has the comment code we just added wrapping it. Towards the end of the ad_network PHP file, there is a line that echos out the $ad_network variable, but it's supposed to only be called if you are doing an SSI style include. But just to check to see if for some reason the script thinks it's SSI, try removing that echo line from the ad_network PHP file.