Problem with array assignment
Public Function Setparm ($parameter, $value) {
$this->parameter[$parameter] = $value;
return $this;
}
function Geturl ($type) {
$this->setproductparm ($type);
return $this->getdata ();
}
Private Function Setproductparm ($urltype) {
$this->parameter=array ();
$this->type= "";
$this->setparm ("Marketplace", Self::marketplaceid);
$this->version= "2009-01-01";
Switch ($urltype) {
Case "Requestreport":
$this->setparm ("Action", "Requestreport");
$this->setparm ("Reporttype", "_get_merchant_listings_data_");
Break
Case "Getreportlist":
$this->setparm ("Action", "getreportlist");
$this->setparm ("Reportrequestidlist.id.1", $this->reportrequestid);
Break
Case "GetReport":
$this->setparm ("Action", "GetReport");
$this->setparm ("ReportID", $this->reportid);
Break
}
}
$url 1= $aa->geturl ("Requestreport");
$url 2= $aa->geturl ("getreportlist");
$url 3= $aa->geturl ("GetReport");
I clear the array before every execution.
$this->parameter=array ();
But the output, each time the array contains the last assigned value.
Each result:
$url 1:reporttype=_get_merchant_listings_data_
$url 2:reporttype=_get_merchant_listings_data_&reportrequestidlist.id.1=123456
$url 3:reporttype=_get_merchant_listings_data_&reportrequestidlist.id.1=123456&reportid=123456
Excuse me, where is the problem???
------to solve the idea----------------------
You don't give a definition of getData, you're not.
------to solve the idea----------------------
See if the following is the way to deal with it.
GetData ();