fork(1) download
  1. <?php
  2. $array = array(12, 14, 121, 123);
  3. $var = "";
  4. foreach ($array as $item) {
  5. $var .= $item . " ";
  6. }
  7. echo $var . "\n";
  8.  
  9. $array = array(12, 14, 121, 123, 12, 125, 1200);
  10. $var = "";
  11. foreach ($array as $item) {
  12. $var .= $item . " ";
  13. }
  14. echo $var . "\n";
  15.  
  16. echo implode($array, ", ");
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
12 14 121 123 
12 14 121 123 12 125 1200 
12, 14, 121, 123, 12, 125, 1200