fork download
  1. <?php
  2.  
  3. $minhaarray = array( '8' => -2, '7' => -1 );
  4.  
  5. $saida = '';
  6. $cola = '';
  7. foreach( $minhaarray as $chave => $valor ) {
  8. $saida .= $cola.$chave.'#'.$valor;
  9. $cola=':';
  10. }
  11.  
  12. echo $saida;
  13.  
  14. ?>
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
8#-2:7#-1