sql - PHP Loops and Arrays
940
How can I list all array items except that there is another Array ? Example:
First array:
$idea_id[$row["id"]] = $row["id"];
Second array:
$m_voted[$votedke] = $row["ideaid"];
Keeping this datas in separate SQL tables.
And how to list all$idea_id
but if
$idea_id[this_item] == $m_voted[any_item]
thenthis item
not listing.
Answer
Solution:
From your question what i understand is you want to check the data exists in the second array.
You can use
in_array
function which check if the idea_id is in m_voted array