fork download
  1. <?php
  2. $input = "test:002005@1111@333333@;10205@2000@666666@;002005@1111@55555@;";
  3. $input = rtrim($input,';');
  4. $temp1 = explode(';',$input);
  5. foreach($temp1 as $val1) {
  6. $temp2 = explode('@',$val1);
  7. $result[] = $temp2[2];
  8. }
  9. print_r($result);
  10.  
Success #stdin #stdout 0.02s 13112KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 333333
    [1] => 666666
    [2] => 55555
)