fork download
  1. <?php
  2. $InfoCursos = "369-478|654-789|790-475|";
  3.  
  4. $InfoCurs = explode("|", $InfoCursos);
  5. $ContCurs = count($InfoCurs) - 1;
  6.  
  7. for($i=0; $i<$ContCurs;$i++)
  8. {
  9. $DatoCurs = explode("-", $InfoCurs[$i]);
  10. $curConsecutivo = $DatoCurs[0];
  11. $jorConsecutivo = $DatoCurs[1];
  12.  
  13. echo $curConsecutivo . " - " . $jorConsecutivo . "\r\n";
  14. }
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
369 - 478
654 - 789
790 - 475