Answer the question
In order to leave comments, you need to log in
Why does a primitive turn into an object?
Data is coming:
print_r($obj);
SimpleXMLElement Object
(
[id] => 1082930
[state] => REGISTERED
)
$params = [
'sector' => SECTOR_ID,
'id' => $obj->id,
'client_ref' => $user->client_ref,
];
print_r($params);
Array
(
[sector] => 2721
[id] => SimpleXMLElement Object
(
[0] => 1082930
)
[client_ref] => test
)
echo $obj->id;
# результат
1082930
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question