Store $requirement and $equip in an array and then return the array ;
PHP Code:
$ret = array();
$ret['equip'] = $equip;
$ret['requirement'] = $requirement;
return $ret
Then you can do this ;
PHP Code:
$req = requirements($id, $userid);
if($req['equip'] == true)
{
echo '<a href="#equip....">You can equip this item</a>';
}
(it would be better to store them in the array all through original function code, rather than just assign them at the end)