php从自定义字符串生成变量[重复]

I am getting some data in $_POST as:

$_POST['data'] = "id=10|Reference=ABCDEFGH|Amount=1|Name=Alen|Ref1=XYZ001";

now i want to access each parameter indivisually. Should i need to explode it, first on '|' AND then on '=' delimiter. Or is there any other proper way ?

</div>