adv Posted November 11, 2007 Share Posted November 11, 2007 you have this : if ($var=="10") { echo "ok"; }else{ echo "not ok"; } and u can do this echo ($var=="10) ? "ok":"not ok"; this u do with if but is there a way to do that with elseif is there a shortcut for elseif ? Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted November 11, 2007 Share Posted November 11, 2007 Edit: Ignore that As far as i know, you can't do anything using if, elseif, else statements in ternary form. Even if you could, it'd get pretty messy. Quote Link to comment Share on other sites More sharing options...
adv Posted November 11, 2007 Author Share Posted November 11, 2007 thanks ginger Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.