banner.php
<link href="../style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
</style>
<div id="banner">
<div class="headerStyle">
<div style="padding:4px 0px;"> Banner</div>
</div>
<?php
include('koneksi.php');
$result = mysql_query("SELECT gambar FROM banner");
while ($data = mysql_fetch_array($result)){
echo "<img src="$data['gambar']">".'<br>';
}
?>
</div>
Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in C:\xampp\htdocs\php_template2\includes\banner.php on line 20
Line 20: echo "<img src="$data">".'<br>';
Why is it?