View Single Post
Old 11-29-2010, 09:53 AM   #2 (permalink)
ttmtake
The Wanderer
 
Join Date: Jan 2009
Posts: 8
Thanks: 0
ttmtake is on a distinguished road
Default

I got something, this checks 2 rows,

PHP Code:
$checkDB mysql_query("SELECT * FROM `table`");
while(
$row mysql_fetch_array($checkDB)) { 

      
      
$rowCat str_replace('|',''$row['cat']);
      
$rowCity str_replace('|',''$row['city']);
     
      
$cat = array($_POST['cat']); 
      
$city= array($_POST['city']); 
      foreach(
$rowCat as $values){
      foreach(
$rowCity as $valuez){      
      
          if(
in_array($cat$values) && in_array($city$valuez)) {
          echo 
$row['id'];
      }
                                }
                                   }
    } 
ttmtake is offline  
Reply With Quote