if()
ステートメントに複数の句を含める方法はありますか?
例えば:
if( ($username=='textUser' && $role=='admin') || ($admin=='yes'))
{
// If the username AND role are set to admin OR if the admin is set to 'yes'
}
else
{
// Neither clauses of the if statement are true
}
おそらくこれは実際には正しいコードですが、試したことはありませんが、そうでない場合は、誰か教えてもらえますか? :)