SimpleXML Ayrıştırma WoWArmory nitelikleri ile Sorun

0 Cevap php

Bu örnek bir öğedir:

SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [displayInfoId] => 62116
            [durability] => 100
            [gem0Id] => 41401
            [gem1Id] => 40123
            [gem2Id] => 0
            [gemIcon0] => inv_jewelcrafting_shadowspirit_02
            [gemIcon1] => inv_jewelcrafting_gem_37
            [icon] => inv_helmet_98
            [id] => 48592
            [level] => 245
            [maxDurability] => 100
            [name] => Liadrin's Headpiece of Triumph
            [permanentEnchantIcon] => ability_warrior_shieldmastery
            [permanentEnchantItemId] => 44876
            [permanentenchant] => 3819
            [pickUp] => PickUpLargeChain
            [putDown] => PutDownLArgeChain
            [randomPropertiesId] => 0
            [rarity] => 4
            [seed] => 0
            [slot] => 0
        )

)

Ben her öğe ile bir JSON nesnesi almak için çalışıyorum, ama yaklaşık 17 ya da bir şey var, ve ben json_encode() tüm malzeme içeren bir nesne olarak "@ attributes" Beni veriyor çalışırsanız ben istiyorum. Yardım?

0 Cevap