title: global array in php
body: <p>i have to function in two different files.
  one of them should add a new item to an array each time is called and the array should be accessible .what i did for it is :</p>
  
  <pre><code>function1(){
  
     global $array;
  
     $array[] = 'hi';
  
  }
  </code></pre>
  
  <p>but it just create one item in array even if i call this function 4 times .</p>