<!doctype html>
<html>
<head>
<title>All</title>
</head>
<body>
<?php
include ("connection.php");
$result = mysqli_query($con, "SELECT * FROM student_data") or die('Query failed');
while($row = mysqli_fetch_array('$result'))
{
echo $row['name'];
echo $row['fname'];
echo $row['sid'];
echo $row['email'];
echo "<br>";
}
?>
</body>
</html>
This i suppose to print every data in the database. But i get the following error. Where am i going wrong?