LegendBreath Posted August 9, 2007 Share Posted August 9, 2007 Hi there, I've been using those kinds of lines a lot recently: ($foo ? 'foo' : 'bar') And was wondering, how is it called? And someone got examples of any others "syntax" that I could apply with those? Like I know that there is also ($a % $b : $c), or something like it. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/63986-what-are-those-called-a-b-c/ Share on other sites More sharing options...
teng84 Posted August 9, 2007 Share Posted August 9, 2007 thats a ternary operator that is same as if else Quote Link to comment https://forums.phpfreaks.com/topic/63986-what-are-those-called-a-b-c/#findComment-318962 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.