I have 2 explode arrays from the database. and this is what i did.
    $searches = explode(',', $searchengine);
    $icons = explode(',', $icon);
    $b = count($searches);
    $c = count($icons);
I also made an array to compare each explode array to.
$searchesa = array("google","yahoo","bing");
    $d = count($searchesa);
    $iconsa = array("facebook","twitter","googleplus","linkedin","pinterest","delicious","stumbleupon","diigo");
    $y = count($iconsa);
Then i used for loops to travel to different array indexes. But the result is wrong, and sometimes I have an error which says UNDEFINED OFFSET.
for ($a=0; $a <$d ; $a++) {
    if ($searches[$a] == $searchesa[$a]) 
            {echo '<br>'.$searchesa[$a].': check ';
        }else
        echo '<br>'.$searchesa[$a].': chok ';
    }
for ($x=0; $x <$y ; $x++) {
    if ($icons[$x] == $iconsa[$x]) 
        echo '<br>'.$iconsa[$x].': check ';
    else
        echo '<br>'.$iconsa[$x].': chok ';
}
If the index from the database and the array I made are the same, it will state check, else it will state chok.
 
     
     
     
     
    