Max,
I'm not sure if I understood the question correctly, but why not just put return $head at the top of the function, i.e.
function header_check($head) {
return $head;
//$head2=...
//if...
//else...
}
Scott A. Hammond, Sr., CEO
Prima Internet, Inc.