i have 2 queries, and i get back some data by doing a whyle loop.
from the first query if i do print_r($final_key);i get:
hey1
hey2
hey3
from the second one, if i do print_r($final_key2); i get:
hey1 test
hey2 test1
hey3
what i am trying to do is to compare the 2 arrays and check for words that match and i can't do it directly from the database
any ideas?
thanks
edit: here is my query 1:
while ($keywords = mysql_fetch_array($keys1, MYSQL_ASSOC)){
foreach ($keywords as $key) {
$plus = '+';
$pos = strripos($key, $plus);
if ($pos === false) { } else {
$clean_plus = preg_replace("/[\+]/", '', $key);
$final_key = str_replace("'", "", $clean_plus);
print_r($final_key);
echo '<br>';
}
}
}
and the second one:
<?php
while ($keywords = mysql_fetch_array($keys)){
if($keywords['kword'] != ''){
echo $keywords['kword'];
} } ?>
i am tryingt o match $final_key against $keywords['kword'];
array("one"=>1, "two", "three")