title: PHP function call not working
body: <p>I would like to print out the values from the return function, my main aim is to call the function from a different file which i have done several times with different functions, but this doesn't seems to work and I cant figure it out. Please help.    </p>
  
  <p>swifty.php
      
  
  <pre><code>    include_once('core/init.php');
      $errorno = 'Please contact the administrator, Quoting err no : q2913, Q Issues referring to: ' . mysqli_error($con);
  
      function getStatus_update() {
          $user_id = (int) $user_data['id'];
          $result = mysqli_query($con, "SELECT * FROM users_status WHERE `user_id` = '$user_id` ORDER BY `date_posted` DESC'");
          $update = array();
          while ($row = mysqli_fetch_array($result)) {
              $update[] = $row;
          }return $update;
      }
  </code></pre>
  
  <p>user.php</p>
  
  <pre><code>&lt;?php
  include_once 'swifty.php';
  $rand = getStatus_update();
  
          foreach ($rand as $k =&gt; $v) {
              var_dump($v['status']);
          }
  </code></pre>
  
  <p>Nothing happens, no error messages, no values returned.</p>