title: How to retrieve Object array value?
body: <p>The thing is that I'm new to OOP PHP and I seem can't find the answer to how to retrieve a specific value from array of objects.</p>
  
  <p>When I run request to the User class and method find_by_sql:</p>
  
  <pre><code>$getAct = User::find_by_sql($sql);
  </code></pre>
  
  <p>The response I get is:</p>
  
  <pre><code>Array
  (
      [0] =&gt; User Object
          (
              [id] =&gt; 6
              [permissions] =&gt; 0
              [email] =&gt; email@example.com
              [password] =&gt; 918f358a5cdf01e63d4609063d9A2bfec57f8455
              [first_name] =&gt; Name
              [last_name] =&gt; Surname
              [city] =&gt; City
              [gender] =&gt; m
              [birth_date] =&gt; 1980-02-02
              [act_code] =&gt; AAAAAAAAAAAAAAA
          )
  
  )
  </code></pre>
  
  <p>My question basically is how can I set [act_code] value to my variable?
  If I would use the non-static method it would be easy since I could just call $obj->act_code.
  But how do I do same from a static method call?</p>