the error reads
mysqli_fetch_array() expects parameter 1 to be mysqli_result, double given in C:\xampp\htdocs\beta\jawa\isi.php on line 744
line 744 is : while($r=mysqli_fetch_array($hasil))
the full code :
<?php
$cari = "SELECT * FROM produk WHERE " ;
for ($i=0; $i<=$jml_kata; $i++) {
$cari .= "deskripsi LIKE '%$pisah_kata[$i]%' OR nama_produk LIKE '%$pisah_kata[$i]%'";
if ($i < $jml_kata ) {
$cari .= " OR ";
}
}
$cari .= " ORDER BY id_produk DESC LIMIT 12";
$hasil = mysqli_query($con,$cari);
while($r=mysqli_fetch_array($hasil)) {
include "diskon_stok.php";
echo"<div class='container_produk'>
<a href='produk-$r[id_produk]-$r[produk_seo].html'><img src='http://images.rajafotocopy.com/foto_produk/$r[gambar]'/></a>
<div class='detail'>
<span style='font-family : sui'>$r[nama_produk]</span><br />
$divharga
</div>
</div>";
}
?>
I don't understand what's wrong with mysqli_result....? it is returning the 1st loop but after that it throws an error and expects parameter 1 to be mysqli_result?