fork(2) download
  1. <?php
  2.  
  3. $in = '1,4|a1,b4';
  4. $pair = explode('|',$in);
  5. $out = array_combine(explode(',',$pair[0]),explode(',',$pair[1]));
  6.  
  7. print_r( $out );
  8. ?>
  9.  
  10.  
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
Array
(
    [1] => a1
    [4] => b4
)