Excellent, thank you kh99. I'm going to try this out.
--------------- Added [DATE]1346099203[/DATE] at [TIME]1346099203[/TIME] ---------------
Thank you kh99, I have had more success. I wanted to verify whether or not I was pulling the information correctly through the php hook. I used print_r to see the array. When using query_first(); unfortunately their was no return. When using query_ready() was able to return the array however.
Array ( [0] => 111 ) Array ( [0] => 2379 ) Array ( [0] => 103 ) Array ( [0] => 28 ) Array ( [0] => 6 ) Array ( [0] => 49 ) Array ( [0] => 192 ) Array ( [0] => 2399 )
PHP Code:
while ($buddy = $db->fetch_array($buddys))
{
if ($doneuser["$buddy[userid]"])
{
continue;
}
$buddylist= explode(' ', trim($buddy['userid']));
$comment['buddylist'] = $buddylist;
print_r($comment['buddylist']);
$doneuser["$buddy[userid]"] = true;
}
When comparing in the template however, I receive this error:
Code:
<vb:if condition="in_array($comment[buddylist], $comment[userid])">A friend posted!</vb:if>
Code:
The following error occurred when attempting to evaluate this template:
%1$s
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Do you think this is a problem with the template reading the variable? Or should I use a different method in comparing the values?
Thanks for your continued support.