title: Learning to "FUNCTION"! How do i call after storing return?
body: <pre><code>function projectdetails($proj_id) {
      include('includes/connection.inc.php');
      $details = &quot;SELECT * FROM projects WHERE id = ?&quot;;
      
      $stmt = $conn-&gt;prepare($details); 
      $stmt-&gt;bind_param(&quot;i&quot;, $proj_id);
      $stmt-&gt;execute();
      $result = $stmt-&gt;get_result(); 
      $project = $result-&gt;fetch_assoc();
  
      $conn-&gt;close();
      return $project; 
  }
  </code></pre>
  <p>How do I call the Columns after storing in a &quot;return&quot;</p>
  <pre><code>&lt;?php 
  
  $projectidentifier = $_GET['project'];
  projectdetails('$projectidentifier');
  
  ?&gt;
  &lt;?php echo $project['ProjectTitle']; ?&gt; 
  </code></pre>
  <p>in the HTML code doesn't seem to work and gives ---- undefined variable error?</p>