object(SimpleXMLElement)#340 (2) { ["@attributes"]=> array(1) { ["code"]=> string(3) "USD" } [0]=> string(7) "11.1000" } 

It is necessary to extend the value of string(7) "11.1000"

    1 answer 1

    In theory, a simple key reference "0" should work.

     $sVal = (string) $object[0]; 

    https://stackoverflow.com/a/2867601