i've got it all working now writing it like this
PHP Code:
function foo()
{
global $vbulletin;
$query = $vbulletin->db->query_read("SELECT * FROM " . mob . " WHERE memberID LIKE " . $vbulletin->userinfo['userid']);
$result = $vbulletin->db->fetch_array($query);
$smsCredits = $result['smsCredits'];
return $smsCredits;
$vbulletin->db->free_result($query);
}
$smsCredits = foo();
then i show the $smsCredits in my template...
it looks kinda complicated, is there a simplified way of writing this?