fork(16) download
  1. <?php
  2.  
  3. $string = "9,admin@example.com,8";
  4.  
  5. $array = explode(",", $string);
  6.  
  7. print_r($array);
  8.  
  9. $no = 1;
  10. foreach ($array as $line) {
  11. echo $no . ". " . $line . PHP_EOL;
  12. $no++;
  13. };
Success #stdin #stdout 0s 82880KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 9
    [1] => admin@example.com
    [2] => 8
)
1. 9
2. admin@example.com
3. 8