<h3 style="border-bottom:2px solid;">Search Results</h3>
<?php
include('config/koneksi2.php');
 
if($_POST['brandss']){
 
//unserialize to jquery serialize variable value
$brandis=array();
$katis=array();

 
parse_str($_POST['brandss'],$brandis); //changing string into array 
parse_str($_POST['kategori'],$katis); //changing string into array 

 
//split 1st array elements
foreach($brandis as $ids)
{
$ids;
}
$brandii=implode("','",$ids);
foreach($katis as $ids1)
{
$ids1;
}
 //change into comma separated value to sub array
$katii=implode("','",$ids1); //change into comma separated value to sub array
echo "<br>";
$sql2 = mysql_query("SELECT * FROM bs_stok WHERE tipe='BIKE' and brand IN ('$brandii') or kategori IN ('$katii')");
while($rows=mysql_fetch_array($sql2)){
?>
  <?php echo $rows['nama']."<br>";  ?>
<?php
  }
  }
  ?>