function deformatNVP($nvpstr) {

        $intial=0;
        $nvpArray = array();

        while(strlen($nvpstr)){
                //postion of Key
                $keypos= strpos($nvpstr,'=');
                //position of value
                $valuepos = strpos($nvpstr,'&')?strpos($nvpstr,'&'):strlen($nvpstr);
                //getting the Key and Value values and storing in a Associative Array
                $keyval=substr($nvpstr,$intial,$keypos);
                $valval=substr($nvpstr,$keypos+1,$valuepos-$keypos-1);
                //decoding the respose
                $nvpArray[urldecode($keyval)] =urldecode( $valval);
                $nvpstr=substr($nvpstr,$valuepos+1,strlen($nvpstr));
        }
        return $nvpArray;
    }