How to write mysql where clause inside php foreach loop. here is my code
$outPut = Array ( [0] => 'intel' [1] => 'amd' );
$Query = select * from laptop
foreach($outPut as $Filtervalues)
{
$Query .= "where processor like '%$Filtervalues%'";
}
echo $Query;
But my output is not correct.
i want output to be as
select * from laptop where (processor like '%intel%' or processor like '%amd%')
select * from laptop where processor like '%intel%' where processor like '%amd%'$outPutdiffers from$outputI guess that's another mistake.