php - diğer dizilerin tuşlarında dizileri yerleştirin.

0 Cevap php

$extraServicos is an array.
I want to add a key to that array called "options" so that, on that key, I can associate another array $extraOpcoes .
On this last array I want to add yet another key called "prices" and associate one last array with it: $precosOpcao.

Nasıl aşağıdaki kod verilmiş böyle bir dizi inşa edebilirsiniz?

$extrasServicos = $servicoDao->servicosExtras($servicoVo);

foreach ($extrasServicos as $extra) {
   $servicoVo->setExtraId($extra->id);
   $extraOpcoes = $servicoDao->extrasOpcoes($servicoVo);
   $servicoVo->setPrecoMoeda('1');
   $servicoVo->setTipoServico('configoptions');    
   $precosOpcao = $servicoDao->precos($servicoVo); 
}

Thanks a lot, MEM

0 Cevap