I was trying to fetch blob image from database after trying a lot and doing many changes in code I cant resolve this error. I have bold that line in my code. If I remove that tag code works but with that tag I get an error. Why this error is occuring and what is the solution. //error Parse error: syntax error, unexpected 'data' (T_STRING), expecting ',' or ';' in C:\xampp\htdocs\project\DBMS\index.php on line 18
<html>
<?php
require "connect.php";
$sql="select * from newbook";
$row = $conn->query($sql);
$n=0;
echo"<form method='post'><table border='0' align='center'><tr>";
while($arr = $row->fetch_assoc())
{
$i=$arr['BookId'];
if($n%4==0)
{
echo "<tr>";
}
echo "
**<td height='280' width='240' align='center'><img src="data:image/jpeg;base64,'.base64_encode( $arr['BookImage'] ).'"height='200' width='200'><br/>**
<b>BOOKNAME:</b>".$arr['BOOKNAME'].
"<br><b>Author:</b>".$arr['Author'].
"<br><b>Publication:</b> ".$arr['PublicatonHouse'].
"<br><b>Discount:</b>".$arr['Discount']."%".
"<br><br><img src='images/MetalPlakDa5new.gif' width='70' height='20'/></a>
<img src='images/view7.jpg' width='70' height='20'/></a>
</td>";
$n++;
}
echo "</tr></table>
</form>";
?>
</body>
</html>