fork download
  1. <?php
  2. $str = 'aaa@aaa|aaa/nbbb@bbb|bbb/nggg@ggg|ggg';
  3. parse_str(preg_replace(array('/\//', '/\|/'), array('&', '='), $str), $res);
  4. print_r($res);
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
Array
(
    [aaa@aaa] => aaa
    [nbbb@bbb] => bbb
    [nggg@ggg] => ggg
)