Sopa xml string to float

Now im getting soap xml response as string…It is not possible to convert float…while converting it to float result getting zero…Help

Can you post some code that reproduces what you’re experiencing?

<?php
$txtAmount=$_REQUEST[‘txtAmount’];
$fromCurrency=$_REQUEST[‘selectFromCurrency’];
$toCurrency=$_REQUEST[‘selectToCurrency’];
//Current Conversion rate
$wsdl=“http://www.webservicex.com/CurrencyConvertor.asmx?WSDL”;
$client = new SoapClient($wsdl,array(‘trace’ => 1));
$country = array( “FromCurrency” => $fromCurrency,
“ToCurrency” => $toCurrency);

if($txtAmount){
$tamt=$txtAmount;
}
if(!$txtAmount){
$tamt=1;
}

$result = $client->ConversionRate($country);
echo "Currency Conversion rate : ".$conversionRate=$client->__getLastResponse();
echo $finalResult=$tamt*$conversionRate; // But result is zero

?>

Why it returns zero???

$finalResult is not set, [fphp]var_dump/fphp $result, which is the response from the API.