DeanWhitehouse Posted December 11, 2008 Share Posted December 11, 2008 how do i do something like $var == 1 : true ? false ?? thanks Link to comment https://forums.phpfreaks.com/topic/136568-solved-shorthand-if/ Share on other sites More sharing options...
GingerRobot Posted December 11, 2008 Share Posted December 11, 2008 You're after the ternary operator Link to comment https://forums.phpfreaks.com/topic/136568-solved-shorthand-if/#findComment-712913 Share on other sites More sharing options...
gevans Posted December 11, 2008 Share Posted December 11, 2008 $foo = ($var == 1) ? TRUE : FALSE; Link to comment https://forums.phpfreaks.com/topic/136568-solved-shorthand-if/#findComment-712916 Share on other sites More sharing options...
DeanWhitehouse Posted December 11, 2008 Author Share Posted December 11, 2008 Thanks Link to comment https://forums.phpfreaks.com/topic/136568-solved-shorthand-if/#findComment-712921 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.