I'm reviewing someone elses code, and came across this line:
There are several things I'd like to learn here.PHP Code:
<?php echo ($view=='folded')? 'folded_form_step':'form_step';?>
For starters, what is
($view=='folded')?all about? This is the first time I've seen anything like that. Is that shorthand for an
IFstatement or something ?
Next, what's with the
Can someone walk me through what's being done here ??
FYI: this is in a class which builds forms, and
$form_stepare vars which get passed into the class, but the code in question does not use the dollar signs. Are they related?