title: Call Variable from a function to another function within PHP class
body: <p>i use this class below i want use the variables array or property array ($g_types) in first_function how i can do this?</p>
  
  <pre><code>class My_Class {
      function first_function() {
          //HOW I CAN USE THE $g_types array Variable values in this function?
      }
      function second_function() {
          $g_types = array(
              'Person Widget'    =&gt; 'g_person',
              'Page Widget'      =&gt; 'g_page',
              'Community Widget' =&gt; 'g_community'
          );
      }
  
  }
  </code></pre>