My code is as follows
$aNewCodes = array("93", "355", "213");
$aServiceProviderId = array();
$oTerminationRate = new TerminationRate();
foreach ($aNewCodes as $iNewCodesKey => $iNewCodesValue)
{
$oTerminationRate->GetServiceProviders($aServiceProviderId, $iNewCodesValue);
foreach($aServiceProviderId as $iProviderKey => $iProviderValue)
{
echo $iNewCodesValue." :: ".$iProviderValue."<br>";
}
}
And it gives me output like this -
93 :: 1
93 :: 2
355 :: 1
355 :: 2
355 :: 1
355 :: 2
213 :: 1
213 :: 2
213 :: 1
213 :: 2
213 :: 1
213 :: 2
Actually I am expecting output like this -
93 :: 1
93 :: 2
355 :: 1
355 :: 2
213 :: 1
213 :: 2
Tried a lot to get that output, but no success. Where am I missing out ?
GetServiceProvidersaccepts its first argument by reference and adds two items to it. If it did not, your code would not give any output.