use the explode function on the & character to create an array of each response, the explode on the = character to get the value:
example:
<?php
$response = "RESULT=0&PNREF=EUJP5D317BEF&RESPMSG=Approved&AVSAD DR=Y&AVSZIP=Y&TOKEN=EC-56J8431826888421H&PAYERID=CTY5D5PM9UPQN&PPREF=3JY5 51007S2876314&CORRELATIONID=247541067846&FEEAMT=0. 51&TAXAMT=1.93&PAYMENTTYPE=instant&PENDINGREASON=completed";
$tFee = 0;
$responses = explode("&", $response);
for ($n=0; $n<sizeof($responses); $n++) {
$tResponse = explode("=", $responses[$n]);
if ($tResponse[0] == "FEEAMT") {
$tFee = $tResponse[1];
break;
}
}
echo $tFee;
?>