-2
  <td>{$row['date']}</td>
          <td><a href="edit.php?applicationid=<?php echo $data['applicationid']; ?>">Edit</a></td>

        </tr>";

In 2nd line I am getting this error: Parse error: syntax error, unexpected identifier "edit", expecting "," or ";"

CBroe
  • 91,630
  • 14
  • 92
  • 150
Hamna
  • 59
  • 7
  • 1
    Is that part of a string? You don't use ` – Barmar Dec 21 '21 at 20:33
  • 1
    The double quote in `href="edit` is ending your string. Either change that to a single quote or escape it with backslash. – Barmar Dec 21 '21 at 20:33
  • It is not working with single quote Parse error: syntax error, unexpected string content "", expecting "-" or identifier or variable or number in C:\xampp\htdocs\users\admin.php on line 98 – Hamna Dec 21 '21 at 20:46

1 Answers1

1

This appears to be part of a string literal, and you're ending the listeral with the " in href=". You need to escape that or use single quotes.

Also, you don't use <?php echo $variable ?> to embed a variable in a string, you use {$variable}, like yo udid with $row['date']

echo "<td>{$row['date']}</td>
          <td><a href='edit.php?applicationid={$data['applicationid']}'>Edit</a></td>

        </tr>";
Barmar
  • 741,623
  • 53
  • 500
  • 612