Answer the question
In order to leave comments, you need to log in
Php simplexml gives different results, why?
I can’t collect sizes with a quantity in one array, more precisely on a local machine of norms
<offer>
<avail quantity="25">
<size quantity="5">S</size>
<size quantity="8">M</size>
<size quantity="13">L</size>
<size quantity="5">XL</size>
</avail>
</offer>
$attrs = $offer->avail->size;
foreach ($attrs as $key => $attr)
if ( ($key == 'size') and (!empty($attr)) )
{
$arr = (array)$attr;
$tSizes[$arr[0]] = $arr["@attributes"]["quantity"];
}
object(SimpleXMLElement)#10 (2) {
["@attributes"]=>
array(1) {
["quantity"]=>
string(1) "5"
}
[0]=>
string(1) "S"
}
object(SimpleXMLElement)#11 (2) {
["@attributes"]=>
array(1) {
["quantity"]=>
string(1) "8"
}
[0]=>
string(1) "M"
}
object(SimpleXMLElement)#10 (2) {
["@attributes"]=>
array(1) {
["quantity"]=>
string(2) "13"
}
[0]=>
string(1) "L"
}
object(SimpleXMLElement)#11 (2) {
["@attributes"]=>
array(1) {
["quantity"]=>
string(1) "5"
}
[0]=>
string(2) "XL"
}
Answer the question
In order to leave comments, you need to log in
Interesting mom.
Cleaning the mother, she is such a cleaning ...
A) return the old vidyakha and try to turn it on without hdd .
B) Check ALL connections! It's better to remove everything (except for the processor) and stick it again.
connected to laptop, not readableDoesn't fit how? Does the BIOS see it?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question