fork download
  1. <?php
  2. $result = '1
  3. 2
  4. 3
  5. 4
  6. 5';
  7. $string = explode("\n", $result);
  8. $test = "";
  9. foreach($string as $key) {
  10. $test .= $key." | ";
  11. }
  12. echo $test;
  13. ?>
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
1  | 2  | 3  | 4  | 5 |