May122009
Let’s keep it simple:
Regular way:
if (statement) {
$variable = "return this if true";
}
else {
$variable = "return this if false";
}
Short way:
$variable = (statement) ? "return if true" : "return if false";
And this is how it works: statement ? if-true : if-false
Home