i cant make array in DomPDF, help me..

emodt posted 11 months ago

So i have this code


//$nama   = str_replace(" ", "_", strtolower($_POST['nama']));
//$alamat = $_POST['alamat'];

require_once "../dompdf/";
//$namaServer = "localhost";  via UNIX socket
    $namaServer = "localhost"; // via TCP/IP
    $namaUser = "root";
    $password = "";
    $database = "bisera";
    // membuat koneksi
    //$mysqli = new \mysqli($server, $username, null, $database);
    mysql_connect($namaServer, $namaUser, $password)or die ("error"); 
	mysql_select_db ("bisera");
	$query = mysql_query("SELECT *FROM data");
	$data = mysql_fetch_array($query); 
	$id_pembeli = $data['id_pembeli'];
	$luas_l1 = $data['luas_l1']; 
	$luas_l2 = $data['luas_l2']; 
	$kualitas = $data['kualitas']; 
	$estimasi_harga = $data['estimasi_harga']; 
	$jenis = $data['jenis']; 
	$nama_pembeli = $data['nama__pembeli']; 
	$alamat = $data['alamat']; 
	$notelp = $data['notelp']; 
	$lokasi_proyek = $data['lokasi_proyek']; 

$html =
   '<html><body>' .
    '<h1>Judul </h1>' .
    '<p><table cellspacing="6" cellpadding="6" border="1" style="border-collapse:collapse; border: 1px solid black;width:100%;" >'.
	'<tr><td>id pembeli</td><td>Luas lt1</td><td>Luas lt2</td><td>Kualitas</td><td>Estimasi Harga</td><td>Type Rumah</td>
	<td>Nama Pembeli</td><td>Alamat</td><td>Nomor Telpon</td>
	<td>Lokasi Proyek</td></tr>'.while($data = mysql_fetch_array($query)){.'<tr>'.
	'</tr>'.}.'</table></p>' .

$dompdf = new DOMPDF();


but it <b>shows Parse error: syntax error, unexpected 'while' (T_WHILE) in C:\xampp\htdocs\bisera3\Admin\print_all.php on line 37</b>

am i wrong putting that 'while' there?

Sign in to participate in this thread!

We'd like to thank these amazing companies for supporting us