I don't know what's the wrong on my code I tryed this function on other file and that's worked but when i added it to a class and trying to call the function from other script file i get this error
Parse error: syntax error, unexpected '<'
my code
public function DisplayP(){
    <?php
    include('C:\xampp\htdocs\x\chessMult\connectToDB.php');
    //session_start();
    //include('C:\xampp\htdocs\x\chessMult\connectToDB.php');
    //include('C:\xampp\htdocs\x\chessMult\chMult\classes\user.php');
    $result = $_db->prepare("SELECT MatchP FROM users ORDER BY UserName DESC");
    $result->execute();
    $row = $result->fetch();
    ?>
    <td><a href="C:\xampp\htdocs\x3\editform.php"> edit </a></td>
    <td><?php echo $row['MatchP']; ?></td>
    <td><?php echo $_SESSION['UserName']; ?></td>
}
and when I remove
<td><a href="C:\xampp\htdocs\x3\editform.php"> edit </a></td>
