southbeach
Programmer
I have this
I am trying to extract quotetotal, quoteversion, busdays and servicetype
Why in the world are they coming out as Objects not as strings?
I keep getting parse errors saying that they are objects - If I try to read it as an xml-simple-object it fails as well.
What am I missing?
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
Code:
object(SimpleXMLElement)#2 (9) {
["ratequoteline"]=>
array(5) {
[0]=>
...
}
["servicetype"]=>
string(14) "NORMAL SERVICE"
["totalweight"]=>
string(4) "2500"
["totalpallets"]=>
string(2) "10"
["totalpieces"]=>
string(2) "10"
["quotetotal"]=>
string(6) "433.26"
["quotedatetime"]=>
array(2) {
[0]=>
string(29) "12/18/2016 13:01:29.290-05:00"
[1]=>
string(29) "12/18/2016 13:01:29.290-05:00"
}
["busdays"]=>
string(1) "7"
["quoteversion"]=>
string(18) "ratequote-20160926"
}
Code:
$amt=trim($xml->quotetotal);
$msg=trim($xml->servicetype);
$qn=trim($xml->quoteversion);
$qd=trim($xml->busdays);
Why in the world are they coming out as Objects not as strings?
I keep getting parse errors saying that they are objects - If I try to read it as an xml-simple-object it fails as well.
What am I missing?
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.