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