Hướng dẫn php inline if

I'd like to to some thing similar to JavaScript's

var foo = true;
foo && doSometing[];

but this doesn't seem to work in PHP.

I'm trying to add a class to a label if a condition is met and I'd prefer to keep the embedded PHP down to a minimum for the sake of readability.

So far I've got:


Chủ Đề