fork download
  1. <?php
  2.  
  3. $str = "//pagina//id/1//";
  4. $item = strtok($str,'/');
  5. $arr[] = $item;
  6.  
  7. while($item = strtok('/')){
  8. $arr[] = $item;
  9. }
  10. print_r($arr);
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
Array
(
    [0] => pagina
    [1] => id
    [2] => 1
)