View difference between Paste ID: RaxXFYKN and spaRADVp
SHOW: | | - or go back to the newest paste.
1
<?php
2
	$cek="select * from outlet_sofie where wilayah='Jakarta' ";
3
	$hasil=mysql_query($cek);
4
$cetak=array();
5
	while ($data=mysql_fetch_array($hasil)){
6-
			echo "<h3>$data[outlet]</h3>";
6+
7-
			echo ("
7+
		    //	echo "<h3>$data[outlet]</h3>";
8
			$cetak[$data['outlet']][]=("
9
				<div class='outlet'>
10
					<h3>$data[nama_outlet]</h3>
11
					Alamat : $data[alamat_outlet]<br>
12
					No Telp : $data[telp_outlet]
13
				</div>
14
			");
15
		}
16-
			echo "<h3>$data[outlet]</h3>";
16+
17-
			echo ("
17+
		//	echo "<h3>$data[outlet]</h3>";
18
			$cetak[$data['outlet']][]= ("
19
					<div class='outlet'>
20
						<h3>$data[nama_outlet]</h3>
21
						Alamat : $data[alamat_outlet]<br>
22
						No Telp : $data[telp_outlet]
23
					</div>
24
				");
25
		}
26-
			echo "<h3>$data[outlet]</h3>";
26+
27-
			echo ("
27+
		//	echo "<h3>$data[outlet]</h3>";
28
			$cetak[$data['outlet']][]= ("
29
				<div class='outlet'>
30
					<h3>$data[nama_outlet]</h3>
31
					Alamat : $data[alamat_outlet]<br>
32
					No Telp : $data[telp_outlet]
33
				</div>
34
			");
35
		}
36-
			echo "<h3>$data[outlet]</h3>";
36+
37-
			echo ("
37+
		//	echo "<h3>$data[outlet]</h3>";
38
			$cetak[$data['outlet']][]=("
39
				<div class='outlet'>
40
					<h3>$data[nama_outlet]</h3>
41
					Alamat : $data[alamat_outlet]<br>
42
					No Telp : $data[telp_outlet]
43
				</div>
44
			");
45
		}
46
	}
47
foreach($cetak as $name=>$values){
48
echo "<h3>{$name}</h3>".implode("\n",$values);
49
}
50
?>