That didn't help. I'm really confused considering this code had been working over a month ago. Now I come back to it and it's just messin with me. It's part of an XML parser I made for shipping with USPS. here is the whole function from part of the script. $shipping is only defined once so I can't be overwriting it.
function endElement($parser, $tagName)
{
global $insideitem, $tag, $item_arrays, $shiptype, $shipping, $shiparea;
if ($tagName == "RateV2Response")
{
$shipping = $item_arrays['Rate'][$shiptype];
echo "<br>Shipping: $shipping<br>";
unset($item_arrays);
$insideitem = false;
}
if ($tagName == "IntlRateResponse")
{
$shipping = $item_arrays['Postage'][$shiptype];
unset($item_arrays);
$insideitem = false;
}
}