fork(1) download
  1. <?php
  2.  
  3. $arraySearchId = array('searchid' => array(
  4. '0' => array(
  5. 'id' => '1',
  6. 'nome' => 'bla',
  7. 'cobrado' => '1',
  8. ),
  9. ));
  10.  
  11. $arraySearchServico = array('searchtiposervico' => array(
  12. '0' => array(
  13. 'id' => '1',
  14. 'tipo_servico' => "Ligacões",
  15. ),
  16.  
  17. '1' => array(
  18. 'id' => '2',
  19. 'tipo_servico' => 'SMS',
  20. ),
  21. ));
  22.  
  23. $arrayResultado = array_merge($arraySearchId, $arraySearchServico);
  24. $json = json_encode($arrayResultado, JSON_UNESCAPED_UNICODE);
  25. print_r($json);
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
{"searchid":[{"id":"1","nome":"bla","cobrado":"1"}],"searchtiposervico":[{"id":"1","tipo_servico":"Ligacões"},{"id":"2","tipo_servico":"SMS"}]}