<?php
function check($user_id, $topic_id){
$query = mysql_query("SELECT user_id, topic_id FROM sa where topic_id='$topic_id' and user_id='$user_id'");
if (mysql_num_rows($query)==1){
return 'you have already voted';
}
else {
$against = ' <li>
<button type="submit" value="Actions" class="against" title="against">
<i></i><span>Against</span></button>
</li>';
$support ='<li>
<button type="submit" value="Actions" class="support" title="support">
<i></i>
<span>Support</span>
</button>
</li>';
return compact('support', 'against');
}
extract(check($_SESSION['user_id'], $topicId));
echo $against;
echo $support;
?>
i keep getting this error:
Warning: extract() [function.extract]: First argument should be an array