fork(1) download
  1. <?php
  2.  
  3. $corretor = array(
  4. 'Carlos',
  5. 'Andre',
  6. 'Rosinei',
  7. 'Vinicius',
  8. 'Thales'
  9. );
  10. $comissao = array(
  11. 5,
  12. 3,
  13. 3,
  14. 3,
  15. 2
  16. );
  17.  
  18. $res = '';
  19. for ($i = 0; $i < count($corretor); $i++){
  20. $res.= $corretor[$i].' - '.$comissao[$i].'% | ';
  21. }
  22.  
  23. echo substr($res, 0, -3);
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
Carlos - 5% | Andre - 3% | Rosinei - 3% | Vinicius - 3% | Thales - 2%