0

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;">&nbsp;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?

2
Contributors
1
Reply
3
Views
5 Years
Discussion Span
Last Post by cereal
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.