希望您能够帮助我。
我尝试了很多不同的方法,但我无法解决这个问题。
我有一个里面有对象的数组:
Array
(
[1] => CntProviderIncentiveResult Object
(
[_StartDate:protected] => 1356303600
[_EndDate:protected] => 1356908400
[_ProviderRoom:CntProviderIncentiveResult:private] => 1
[_RoomName:CntProviderIncentiveResult:private] => Doble
[_RoomCode:CntProviderIncentiveResult:private] => 2370
[_PropertyCode:CntProviderIncentiveResult:private] => anglers
[_Occupancy:CntProviderIncentiveResult:private] =>
[_Currency:CntProviderIncentiveResult:private] =>
[_AllocationGroup:CntProviderIncentiveResult:private] =>
[_FreeSaleGroup:CntProviderIncentiveResult:private] =>
[_StopSaleGroup:CntProviderIncentiveResult:private] =>
[_ReleaseGroup:CntProviderIncentiveResult:private] =>
[_MinStayGroup:CntProviderIncentiveResult:private] =>
[_UpdateRequirement:CntProviderIncentiveResult:private] =>
) )
我尝试将其中一个对象分配给设置数组键的新数组:
$ConfirmRoom = $ConfirmRoomData[$roomKey];
$roomKey
数组的键在哪里。(1, 20, 21)
在我验证是否做得很好之后:
if ($ConfirmRoom instanceof CntProviderIncentiveResult) {echo "OK";}
但是新对象$ConfirmRoom
总是空的。
你能让我看到光明吗?