There is such a construction
$params = array ("Id"=>"{$deal_id}", "program"=>"2","Positions"=>array(array("OfferId"=>"89", "Count"=> "$total_area"), array("OfferId"=>"124", "Count"=> "$total_reika"), array("OfferId"=>"125", "Count"=> "$total_lightnings"))); $Price = new stdClass(); $Price->Value = 100; $params[Positions][0][Price] = $Price; $Price->Value = 200; $params[Positions][1][Price] = $Price; $Price->Value = 300; $params[Positions][2][Price] = $Price; Here is what print_r prints ($ params)
Array ( [Id] => 531 [program] => 2 [Positions] => Array ( [0] => Array ( [OfferId] => 89 [Count] => 20 [Price] => stdClass Object ( [Value] => 300 ) ) [1] => Array ( [OfferId] => 124 [Count] => 1 [Price] => stdClass Object ( [Value] => 300 ) ) [2] => Array ( [OfferId] => 125 [Count] => 1 [Price] => stdClass Object ( [Value] => 300 ) ) ) ) Why is the value of Price-> Value for all positions equal to 300?