你好,我在徘徊如何完成这项工作。
if ($accounttype == a) {
print('Member')
}
elseif ($accounttype == b) {
print('Moderator')
}
elseif ($accounttype == c) {
print('Admin')
}
else {
print('No rank')
}
尝试使用这个:
if ($accounttype == 'a') {
print 'Member';
} elseif ($accounttype == 'b') {
print 'Moderator';
} elseif ($accounttype == 'c') {
print 'Admin';
} else {
print 'No rank';
}
您需要在引号中使用字符串,并且不要忘记行尾;
分号