fork(2) download
  1. <?php
  2.  
  3. $resposta = array('shopId' => 33015842,
  4. 'paymentMethod' => 'E_COMMERCE',
  5. 'contractNumber' => 1026194250,
  6. 'Nome' => 'Fabio');
  7.  
  8. foreach ($resposta as $chave => $valor) {
  9. if ($chave == 'shopId' or $chave == 'paymentMethod'){
  10. echo "{$chave} {$valor} \n";
  11. }
  12. }
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout
shopId 33015842 
paymentMethod E_COMMERCE