Note that there are some explanatory texts on larger screens.

plurals
  1. POphp access object values
    text
    copied!<p>EDIT: Thanks everyone. I didn't even notice it was private lol, so I changed them from private to public, now it should be accessible... question now is how can I access the value of say 'backpackPosition'? thanks again!</p> <pre><code>TF2Inventory Object ( [fetchDate] =&gt; 123456123 [items] =&gt; Array ( [60] =&gt; TF2Item Object ( [equipped] =&gt; Array ( [scout] =&gt; 1 [sniper] =&gt; 1 [soldier] =&gt; 1 [demoman] =&gt; 1 [medic] =&gt; 1 [heavy] =&gt; 1 [pyro] =&gt; 1 [spy] =&gt; 1 ) [attributes] =&gt; Array ( [0] =&gt; stdClass Object ( [name] =&gt; custom employee number [class] =&gt; set_employee_number [value] =&gt; 0 ) [1] =&gt; stdClass Object ( [name] =&gt; cannot trade [class] =&gt; cannot_trade [value] =&gt; 1 ) ) [backpackPosition] =&gt; 61 [className] =&gt; tf_wearable [count] =&gt; 1 [defindex] =&gt; 170 [id] =&gt; 535518002 [level] =&gt; 20 [name] =&gt; Primeval Warrior [quality] =&gt; unique [slot] =&gt; misc [tradeable] =&gt; [type] =&gt; Badge ) [43] =&gt; TF2Item Object ( [equipped] =&gt; Array ( [scout] =&gt; 0 [sniper] =&gt; 0 [soldier] =&gt; 0 [demoman] =&gt; 0 [medic] =&gt; 0 [heavy] =&gt; 0 [pyro] =&gt; 0 [spy] =&gt; 0 ) [attributes] =&gt; Array ( [0] =&gt; stdClass Object ( [name] =&gt; cannot trade [class] =&gt; cannot_trade [value] =&gt; 1 ) ) [backpackPosition] =&gt; 44 [className] =&gt; tf_wearable [count] =&gt; 1 [defindex] =&gt; 471 [id] =&gt; 535518003 [level] =&gt; 50 [name] =&gt; Proof of Purchase [quality] =&gt; unique [slot] =&gt; head [tradeable] =&gt; [type] =&gt; Hat ) [42] =&gt; TF2Item Object ( [equipped] =&gt; Array ( [scout] =&gt; 1 [sniper] =&gt; 1 [soldier] =&gt; 1 [demoman] =&gt; 1 [medic] =&gt; 1 [heavy] =&gt; 1 [pyro] =&gt; 1 [spy] =&gt; 1 ) [attributes] =&gt; [backpackPosition] =&gt; 43 [className] =&gt; tf_wearable [count] =&gt; 1 [defindex] =&gt; 278 [id] =&gt; 541628464 [level] =&gt; 31 [name] =&gt; Horseless Headless Horsemann's Head [quality] =&gt; unique [slot] =&gt; head [tradeable] =&gt; [type] =&gt; Hat ) [59] =&gt; TF2Item Object ( [equipped] =&gt; Array ( [scout] =&gt; 0 [sniper] =&gt; 0 [soldier] =&gt; 0 [demoman] =&gt; 0 [medic] =&gt; 0 [heavy] =&gt; 0 [pyro] =&gt; 0 [spy] =&gt; 0 ) [attributes] =&gt; Array ( [0] =&gt; stdClass Object ( [name] =&gt; cannot trade [class] =&gt; cannot_trade [value] =&gt; 1 ) ) [backpackPosition] =&gt; 60 [className] =&gt; tf_wearable [count] =&gt; 1 [defindex] =&gt; 115 [id] =&gt; 548155039 [level] =&gt; 10 [name] =&gt; Mildly Disturbing Halloween Mask [quality] =&gt; unique [slot] =&gt; head [tradeable] =&gt; [type] =&gt; Holiday Hat ) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload