if($refbalance > 0) {
$data['paid'] = '
'.htmlspecialchars($reward).' '.$unit.' + '.htmlspecialchars($refbalance).' '.$unit.' for referrals was sent to
Was that fun? Try real game!';
The syntax seems a bit off in that code, are you sure it works?
Also, for future reference, $data['paid'] .= 'something'; is the same as $data['paid'] = $data['paid'] . 'something';