ibnclaudius Posted December 4, 2011 Share Posted December 4, 2011 What is this? I'm not understanding it. style="<?= $D->tabs_state['all']==0||$D->tab=='all'?'display:none;':'' ?>" Quote Link to comment https://forums.phpfreaks.com/topic/252478-what-is-this/ Share on other sites More sharing options...
btellez Posted December 5, 2011 Share Posted December 5, 2011 It's the same as: style="<?php if($D->tabs_state['all']==0 || $D->tab=='all') echo'display:none;' ; ?>" php code is parsed inside the double quotes of the html Quote Link to comment https://forums.phpfreaks.com/topic/252478-what-is-this/#findComment-1294466 Share on other sites More sharing options...
ibnclaudius Posted December 5, 2011 Author Share Posted December 5, 2011 oh, got it... but i'm not understanding this part: echo'display:none;' ; Quote Link to comment https://forums.phpfreaks.com/topic/252478-what-is-this/#findComment-1294469 Share on other sites More sharing options...
btellez Posted December 5, 2011 Share Posted December 5, 2011 that is just css thats being echoed. The result is: .. style="display:none;" ... that just keeps the html element from being displayed in your browser.... Quote Link to comment https://forums.phpfreaks.com/topic/252478-what-is-this/#findComment-1294470 Share on other sites More sharing options...
Pikachu2000 Posted December 5, 2011 Share Posted December 5, 2011 What you posted in the OP is called ternary syntax, and is basically a shorthand if/else. Quote Link to comment https://forums.phpfreaks.com/topic/252478-what-is-this/#findComment-1294484 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.