olkはokの誤植です。。。

$hoge = 'c';

if ($hoge ne 'a' and $hoge ne 'b' ){
 print "ok";
}

なら ok で、このとき $hoge = 'b' ならなにもしないんですよね?