I am always forgetting how to do this shortcut in PHP so I figured if I post it I will always have it.
(condition ? value if true : value if false)
if ($iamcool==true) {
$x=1;
} else {
$x=2;
}
is the same as
if ($imamcool==true) : $x=1 ? $x=2;
Showing posts with label shortcuts. Show all posts
Showing posts with label shortcuts. Show all posts
Tuesday, November 21, 2006
Subscribe to:
Posts (Atom)